Re: [PERFORM] Optimizing Bitmap Heap Scan.

2009-12-08 Thread Robert Haas
2009/12/8 Lennin Caro > > From: niraj patel > > Subject: Re: [PERFORM] Optimizing Bitmap Heap Scan. > To: "Grzegorz Jaśkiewicz" > Cc: pgsql-performance@postgresql.org > Date: Tuesday, December 8, 2009, 1:50 PM > > Hi gryzman, > > I have run vacuum full

Re: [PERFORM] Optimizing Bitmap Heap Scan.

2009-12-08 Thread Kevin Grittner
Lennin Caro wrote: > I have run vacuum full That's not usually a good idea. For one thing, it will tend to bloat your indexes. -Kevin -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsq

Re: [PERFORM] Optimizing Bitmap Heap Scan.

2009-12-08 Thread Lennin Caro
From: niraj patel Subject: Re: [PERFORM] Optimizing Bitmap Heap Scan. To: "Grzegorz Jaśkiewicz" Cc: pgsql-performance@postgresql.org Date: Tuesday, December 8, 2009, 1:50 PM Hi gryzman, I have run vacuum full analyze on the cmrules tables. The version of pstgres is 8.2.13. How shoul

Re: [PERFORM] Optimizing Bitmap Heap Scan.

2009-12-08 Thread Matthew Wakeling
On Tue, 8 Dec 2009, niraj patel wrote: Thanks very much for the analysis. It does takes 17 sec to execute when data is not in cache. It sounds like the table is already very much ordered by the workspaceid, otherwise this would have taken much longer. What I would like to ask can partitionin

Re: [PERFORM] Optimizing Bitmap Heap Scan.

2009-12-08 Thread niraj patel
ny sort of selective index would help me. Thanks. From: Matthew Wakeling To: niraj patel Cc: pgsql-performance@postgresql.org Sent: Tue, 8 December, 2009 7:33:38 PM Subject: Re: [PERFORM] Optimizing Bitmap Heap Scan. On Tue, 8 Dec 2009, niraj patel wrote: >

Re: [PERFORM] Optimizing Bitmap Heap Scan.

2009-12-08 Thread Matthew Wakeling
On Tue, 8 Dec 2009, niraj patel wrote:  Group  (cost=509989.19..511518.30 rows=9 width=10) (actual time=1783.102..2362.587 rows=261 loops=1)    ->  Sort  (cost=509989.19..510753.74 rows=305821 width=10) (actual time=1783.097..2121.378 rows=272211 loops=1) Sort Key: topfamilyid

Re: [PERFORM] Optimizing Bitmap Heap Scan.

2009-12-08 Thread niraj patel
PM Subject: Re: [PERFORM] Optimizing Bitmap Heap Scan. it looks like it might choose wrong plan, cos it gets the stats wrong. Try increasing number of stats to 100. Btw, what version it is ?

Re: [PERFORM] Optimizing Bitmap Heap Scan.

2009-12-08 Thread Grzegorz Jaśkiewicz
it looks like it might choose wrong plan, cos it gets the stats wrong. Try increasing number of stats to 100. Btw, what version it is ?

[PERFORM] Optimizing Bitmap Heap Scan.

2009-12-08 Thread niraj patel
Hi All, I have to optimize following query : SELECT r.TopFamilyID AS FamilyID, FROM CMRules r WHERE r.WorkspaceID =18512 GROUP BY r.TopFamilyID ; The explain plan is as follows : Group (cost=509989.19..511518.30 rows=9 width=10) (actual time=1783.102..2362.587 rows