Re: Select too many ids..

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Select too many ids..
Дата
Msg-id dcc563d10710020931h55236a58wb8068cca8fa7a7fe@mail.gmail.com
обсуждение исходный текст
Ответ на Select too many ids..  (Abandoned <besturk@gmail.com>)
Список pgsql-general
On 10/1/07, Abandoned <besturk@gmail.com> 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?

В списке pgsql-general по дате отправления:

Предыдущее
От: Ottavio Campana
Дата:
Сообщение: create visual query in web applications
Следующее
От: "Rodrigo De León"
Дата:
Сообщение: Re: Select too many ids..