Re: problem in select - Mailing list pgsql-general

From Richard Huxton
Subject Re: problem in select
Date
Msg-id 200209131756.26359.dev@archonet.com
Whole thread Raw
In response to problem in select  ("frank_lupo" <frank_lupo@email.it>)
List pgsql-general
On Friday 13 Sep 2002 5:32 pm, frank_lupo wrote:
> This selection is more fast in ingres vs postgres
> Ingres 6.4    0.04 sec
> Postgres 7.2  0.42 sec
> select titolo,id,anno from ircalend where anno=2002 and id in(select
> distinct(idcalend) from ircalend_3) order by anno,titolo
 because ?

Who knows? If you want people to help with this, you'll need to give them more
information. Things like the output of EXPLAIN SELECT ... and some details on
how many records are in each table would be a good start.

So, given that we don't have that I'd suggest looking to see if you can't
replace IN with EXISTS since PostgreSQL isn't very clever about IN. See mail
archives and manual for details. But look at the EXPLAIN readout first.

- Richard Huxton

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: problem in select
Next
From: "Nigel J. Andrews"
Date:
Subject: Re: problem in select