Re: [PERFORM] Very slow queries - please help

2005-12-12 Thread Bealach-na Bo
Thanks very much - there are a lot of good articles there... Reading as fast as I can :) Best, Bealach From: Thomas F. O'Connell [EMAIL PROTECTED] To: Bealach-na Bo [EMAIL PROTECTED] CC: PgSQL - Performance pgsql-performance@postgresql.org Subject: Re: [PERFORM] Very slow queries - please

Re: [PERFORM] Very slow queries - please help

2005-12-03 Thread Thomas F. O'Connell
On Nov 24, 2005, at 12:14 PM, Bealach-na Bo wrote: The consensus seems to be that I need more indexes and I also need to look into the NOT IN statement as a possible bottleneck. I've introduced the indexes which has led to a DRAMATIC change in response time. Now I have to experiment with INNER

[PERFORM] Very slow queries - please help.

2005-11-24 Thread Bealach-na Bo
Hi Folks, I'm new to Postgresql. I'm having great difficulties getting the performance I had hoped for from Postgresql 8.0. The typical query below takes ~20 minutes !! I hope an expert out there will tell me what I'm doing wrong - I hope *I* am doing something wrong. Hardware Single

Re: [PERFORM] Very slow queries - please help.

2005-11-24 Thread Claus Guttesen
Typical query SELECT n.name FROM node n WHERE n.name LIKE '56x%' AND n.type='H' AND n.usage='TEST' AND n.node_id NOT IN (select n.node_id FROM job_log j INNER JOIN node n ON j.node_id = n.node_id WHERE n.name LIKE '56x%' AND n.type='H' AND n.usage='TEST' AND

Re: [PERFORM] Very slow queries - please help.

2005-11-24 Thread Bealach-na Bo
: Claus Guttesen [EMAIL PROTECTED] To: Bealach-na Bo [EMAIL PROTECTED] CC: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Very slow queries - please help. Date: Thu, 24 Nov 2005 14:23:38 +0100 Typical query SELECT n.name FROM node n WHERE n.name LIKE '56x%' AND n.type='H

Re: [PERFORM] Very slow queries - please help.

2005-11-24 Thread Guillaume Smet
Hi, I'm also sending the EXPLAIN outputs. Please provide EXPLAIN ANALYZE outputs instead of EXPLAIN. You will have more information. Indexes on your tables are obviously missing. You should try to add: CREATE INDEX idx_node_filter ON node(name, type, usage); CREATE INDEX

Re: [PERFORM] Very slow queries - please help.

2005-11-24 Thread Tom Lane
Bealach-na Bo [EMAIL PROTECTED] writes: I'm having great difficulties getting the performance I had hoped for from Postgresql 8.0. The typical query below takes ~20 minutes !! You need to show us the table definition (including indexes) and the EXPLAIN ANALYZE results for the query. It seems

Re: [PERFORM] Very slow queries - please help

2005-11-24 Thread Bealach-na Bo
OK. The consensus seems to be that I need more indexes and I also need to look into the NOT IN statement as a possible bottleneck. I've introduced the indexes which has led to a DRAMATIC change in response time. Now I have to experiment with INNER JOIN - OUTER JOIN variations, SET

[PERFORM] Very slow queries - please help

2005-11-24 Thread Bealach-na Bo
A quick note to say that I'm very grateful for Tom Lane's input also. Tom, I did put you on the list of recipients for my last posting to pgsql-performance, but got: cut here This is an automatically generated Delivery Status Notification. Delivery to