Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UB9rn-0005d1-Gh for pgsql-performance@arkaria.postgresql.org; Thu, 28 Feb 2013 20:14:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UB9rm-00056N-SB for pgsql-performance@arkaria.postgresql.org; Thu, 28 Feb 2013 20:14:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UB9rl-000565-Lj for pgsql-performance@postgresql.org; Thu, 28 Feb 2013 20:14:09 +0000 Received: from toroondcbmts05-srv.bellnexxia.net ([207.236.237.39]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UB9rh-0007kj-FI for pgsql-performance@postgresql.org; Thu, 28 Feb 2013 20:14:08 +0000 Received: from toip41-bus.srvr.bell.ca ([67.69.240.42]) by toroondcbmts05-srv.bellnexxia.net (InterMail vM.8.00.01.00 201-2244-105-20090324) with ESMTP id <20130228201403.YAPZ26520.toroondcbmts05-srv.bellnexxia.net@toip41-bus.srvr.bell.ca>; Thu, 28 Feb 2013 15:14:03 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgIFAMisL1FGMVM9/2dsb2JhbABFgkODI7xJfBZzgiABBQgCHgVMDQMCBgMNORk+AgQBHQWIA7ksiAaOcCQHg0ADgSGHSYUtjkOKUYMm X-IronPort-AV: E=Sophos;i="4.84,756,1355115600"; d="scan'208,217";a="420322863" Received: from unknown (HELO CAPRICA) ([70.49.83.61]) by toip41-bus.srvr.bell.ca with ESMTP; 28 Feb 2013 15:13:51 -0500 From: "Carlo Stonebanks" To: "'Gavin Flower'" , "'Nikolas Everett'" Cc: "'Marc Mamin'" , "'Jeff Janes'" , References: <005701ce0fb5$6f841f30$4e8c5d90$@sympatico.ca> <001501ce1054$7b518380$71f48a80$@sympatico.ca> <006201ce1125$2c554150$84ffc3f0$@sympatico.ca> <5127CFF8.4010402@archidevsys.co.nz> In-Reply-To: <5127CFF8.4010402@archidevsys.co.nz> Subject: Re: Are bitmap index scans slow to start? Date: Thu, 28 Feb 2013 15:13:50 -0500 Message-ID: <004601ce15f0$1fc6ce20$5f546a60$@sympatico.ca> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0047_01CE15C6.36F13B50" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHaXprYpEPEIaXdLmMZOCaAwfiQhwMAB23aAo8fOP4CRcCoxQGZrFXnAfFz5MACHRVr3pgLM94A Content-Language: en-ca X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org This is a multipart message in MIME format. ------=_NextPart_000_0047_01CE15C6.36F13B50 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit <> Technically, yes. That would really help, but the issue is scheduling. Although the logs are closed off for writes, they aren't closed off for reads, ref PG documentation: "When a table is being clustered, an ACCESS EXCLUSIVE lock is acquired on it. This prevents any other database operations (both reads and writes) from operating on the table until the CLUSTER is finished." Not ideal, but a lot better than doing nothing at all! ------=_NextPart_000_0047_01CE15C6.36F13B50 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

<<Could you use CLUSTER on the table after it = had been closed off?  If appropriate, that should make the queries = run much faster, as elated entries will be in the same or nearby blocks = on disk.

>> 

 

Technically, yes. That would really help, but the issue is = scheduling. Although the logs are closed off for writes, they = aren’t closed off for reads, ref PG documentation: “When a = table is being clustered, an ACCESS EXCLUSIVE lock is acquired on it. = This prevents any other database operations (both reads and writes) from = operating on the table until the CLUSTER is = finished.”

 

Not ideal, but a lot better than doing nothing at = all!

------=_NextPart_000_0047_01CE15C6.36F13B50--