Search Postgresql Archives

Re: Select too many ids..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/1/07, Abandoned <besturk@xxxxxxxxx> wrote:
> Hi..
> I have a id list and id list have 2 million dinamic elements..
> I want to select what id have point..
> I try:
>
> SELECT id, point FROM table WHERE id in (IDLIST)
>
> This is working but too slowly and i need to performance..
>
> I'm sorry my bad english.
> King regards..

Try adding another bit of where clause:

SELECT id, point FROM table WHERE id in (IDLIST) and point is not null

it may be faster with a partial index " on table(id) where point is
null " or something like that.

What does explain / explain analyze say about the query?

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux