Re: Problem with very big queries.

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Panagiotis Papadakos <papadako(at)csd(dot)uoc(dot)gr>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problem with very big queries.
Date: 2008-04-10 23:52:15
Message-ID: 47FEA82F.4000104@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Panagiotis Papadakos wrote:
> Hello everybody.
>
> I want to send to postgresql-8.0 a very big query,
> select * from table where lala IN (....)
> Inside IN there are almost 60000 values.
>

I think I'd put those 60000 values in their own table, and use some sort
of join.

select t.f1,t.f2 from table as t, table2 as b WHERE t.lala = b.lala;

or something like that. (i'm lousy at figuring out joins)

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2008-04-11 00:51:44 Re: Patch to add a socketTimeout property.
Previous Message Panagiotis Papadakos 2008-04-10 23:29:49 Re: Problem with very big queries.