Re: SELECT * FROM t where p or q;

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: SELECT * FROM t where p or q;
Дата
Msg-id 20011120000953.M53451-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на SELECT * FROM t where p or q;  (frbn@efbs-seafrigo.fr)
Список pgsql-sql
On Fri, 16 Nov 2001 frbn@efbs-seafrigo.fr wrote:

> hi,
> on a +10 millions rec table, a simple select:
>
> SELECT * FROM tab where num = x;
>
> time: 5 secondes
>
> SELECT * FROM tab where num = y;
>
> time: 5 secondes
>
>
> SELECT * FROM tab WHERE num = x OR num = y;
>
> time: more than 10 mn !!!
>
> num is an integer.

Have you run vacuum analyze, what does explain show
on the three queries?




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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Foreign Key Constraint Deletion Order
Следующее
От: Dino Cherian
Дата:
Сообщение: When to connect and disconnect Connection