FW: [PERFORM] slow query on postgres 8.4

2012-11-20 Thread Russell Keane
set 3000 Hi Maria, It appears to be doing a sort so that it can carry out the group by clause but the group by doesn't appear to be necessary as you're selecting the max(b.ID) after doing the group by. If you omit the group by then it will return more rows in that part of the query but

Re: [PERFORM] intercepting where clause on a view or other performance tweak

2012-11-16 Thread Russell Keane
I should've also mentioned that we're using PG 9.0. -Original Message- From: pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance-ow...@postgresql.org] On Behalf Of Russell Keane Sent: 16 November 2012 15:18 To: pgsql-performance@postgresql.org Subject: Re

Re: [PERFORM] intercepting where clause on a view or other performance tweak

2012-11-16 Thread Russell Keane
6 November 2012 15:05 To: Russell Keane Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] intercepting where clause on a view or other performance tweak Russell Keane writes: > Running the following query takes 56+ ms as it does a seq scan of the whole > table: > SELECT CODE FR

[PERFORM] intercepting where clause on a view or other performance tweak

2012-11-16 Thread Russell Keane
rd query Is there an easier way to do this? As always, thanks for you help... Regards, Russell Keane INPS Tel: +44 (0)20 7501 7277 [cid:image001.jpg@01CDC3FE.8C3BC810] Follow us<https://twitter.com/INPSnews> on twitter | visit www.inps.co.uk<http://www.inps.co.uk/> _

Re: [PERFORM] query using incorrect index

2012-08-03 Thread Russell Keane
taset (and much more of the queries will specify this clause) and the results are very promising. I will also try changing the settings and report back. Thanks again guys, -Original Message- From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov] Sent: 03 August 2012 15:34 To: Rus

Re: [PERFORM] query using incorrect index

2012-08-03 Thread Russell Keane
er: (messageq_table.incoming AND (NOT messageq_table.inactive) AND (aud_status_to_flag(messageq_table.aud_status) = 1))" " Buffers: shared read=3" "-> Bitmap Index Scan on messageq4 (cost=0.00..174.08 rows=4920 width=0) (actual time=0.037..0.037 rows=0 loops=1)&

Re: [PERFORM] query using incorrect index

2012-08-03 Thread Russell Keane
unsure that the first query is really relevant, it was simply there to justify the messageq1 index. Thanks, From: Robert Klemme [mailto:shortcut...@googlemail.com] Sent: 03 August 2012 10:18 To: Russell Keane; pgsql-performance Subject: Re: [PERFORM] query using incorrect index On Thu, Aug 2,

[PERFORM] query using incorrect index

2012-08-02 Thread Russell Keane
ng = true))" "Buffers: shared read=3" "Total runtime: 0.098 ms" Clearly the statistics are off somehow but I really don't know where to start. Any help you can give me would be very much appreciated. Regards, Russell Keane INPS Tel: