On Wed, Sep 07, 2005 at 12:22:27PM -0400, Christian Compagnon wrote: > I'm a newbie in postgresql, I've installed it on a Windows XP machine > ( I can't use linux, it's a company machine ), I'm courious why this > query takes so long
It sounds like you've set work_mem too low; increasing it might help. Also try rewriting your query to SELECT "Rut Cliente" FROM "Internet_Abril" WHERE "Rut Cliente" NOT IN ( SELECT "Rut Cliente" FROM "Internet_Enero" ) AND "Rut Cliente" NOT IN ( SELECT "Rut Cliente" FROM "Internet_Febrero" ) AND "Rut Cliente" NOT IN ( SELECT "Rut Cliente" FROM "Internet_Marzo" ) (I'm not sure how optimized UNION inside an IN/NOT IN is.) /* Steinar */ -- Homepage: http://www.sesse.net/ ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org