Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id F2D1B11C6643 for ; Mon, 9 Apr 2012 20:51:14 -0300 (ADT) Received: from [2001:1528:137::f1] (helo=mail.gransy.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHOMa-0004Us-Kd for pgsql-performance@postgresql.org; Mon, 09 Apr 2012 23:51:13 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id 63E5650867C for ; Tue, 10 Apr 2012 01:50:59 +0200 (CEST) Received: from mail.gransy.com ([82.208.29.194]) by antispam.gransy.com (antispam.gransy.com [77.78.104.124]) (amavisd-new, port 10024) with ESMTP id 3LtD8EvexWr3 for ; Tue, 10 Apr 2012 01:50:59 +0200 (CEST) Received: by mail.gransy.com (Postfix, from userid 5000) id 50B76508680; Tue, 10 Apr 2012 01:50:59 +0200 (CEST) Received: from [192.168.1.237] (ip-78-45-133-255.net.upcbroadband.cz [78.45.133.255]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.gransy.com (Postfix) with ESMTPSA id 2AF6A50867C for ; Tue, 10 Apr 2012 01:50:59 +0200 (CEST) Message-ID: <4F8375E3.1030409@fuzzy.cz> Date: Tue, 10 Apr 2012 01:50:59 +0200 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: about multiprocessingmassdata References: <2012040423524938620013@gmail.com> <4F7C7827.7080705@fuzzy.cz> <2012040500491136389424@gmail.com> <4F7C7E07.1050507@fuzzy.cz> <201204051028153413205@gmail.com> <4F7D8F28.6000805@fuzzy.cz> <201204052144226175873@gmail.com> <4F7DB092.1000400@fuzzy.cz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:1528:137::f1 (failed) X-Pg-Spam-Score: -1.1 (-) X-Archive-Number: 201204/84 X-Sequence-Number: 46730 On 10.4.2012 00:37, Merlin Moncure wrote: > On Thu, Apr 5, 2012 at 9:47 AM, Tomas Vondra wrote: >> If you have slower drives, the dependency is about linear (half the >> speed -> twice the time). So either your drives are very slow, or >> there's something rotten. >> >> I still haven's seen iostat / vmstat output ... that'd tell us much more >> about the causes. > > geometry column can potentially quite wide. one thing we need to see > is the table has any indexes -- in particular gist/gin on the > geometry. Yeah, but in one of the previous posts the OP posted this: relname | relpages | reltuples -------------+----------+------------- poi_all_new | 2421133 | 6.53328e+06 which means the table has ~ 19GB for 6.5 million rows, so it's like 2.8GB per 1 million of rows, i.e. ~3kB per row. I've been working with 1 million rows and 1.3GB of data, so it's like 50% of the expected amount. But this does not explain why the SELECT COUNT(*) takes 364 seconds on that machine. That'd mean ~8MB/s. Regarding the indexes, the the OP already posted a description of the table and apparently there are these indexes: Indexes: "poi_all_new_pk" PRIMARY KEY, btree (ogc_fid) "poi_all_new_flname_idx" btree (flname) "poi_all_new_geom_idx" btree (wkb_geometry) "poi_all_new_ogc_fid_idx" btree (ogc_fid) "poi_all_new_pinyin_idx" btree (pinyin) So none of them is GIN/GIST although some one of them is on the geometry column. T.