Skip site navigation (1) Skip section navigation (2)

Re: Very slow queries - please help.

From: Claus Guttesen <kometen(at)gmail(dot)com>
To: Bealach-na Bo <bealach_na_bo(at)hotmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Very slow queries - please help.
Date: 2005-11-24 13:23:38
Message-ID: b41c75520511240523t3372661fw@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
> 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 j.job_name = 'COPY FILES'
> AND j.job_start >= '2005-11-14 00:00:00'
> AND (j.job_stop <= '2005-11-22 09:31:10' OR j.job_stop IS NULL))
> ORDER BY n.name

Do you have any indexes?

regards
Claus

In response to

Responses

pgsql-performance by date

Next:From: Bealach-na BoDate: 2005-11-24 14:36:06
Subject: Re: Very slow queries - please help.
Previous:From: Bealach-na BoDate: 2005-11-24 13:06:48
Subject: Very slow queries - please help.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group