Re: [HACKERS] [GENERAL] when are indexes used?

Поиск
Список
Период
Сортировка
От Andreas Zeugswetter
Тема Re: [HACKERS] [GENERAL] when are indexes used?
Дата
Msg-id 37EA59BB.47245CD4@telecom.at
обсуждение исходный текст
Список pgsql-hackers
1. run:

vacuum auth;

> real problem is with a ~6000 row database and a select * ... 
> order by query
> which takes more than 5 sec. The same query runs for less 
> than 0.1 sec on mssql
> :-((

No way you select 6000 rows in 0.1 sec with mssql, 
that would be 60000 rows/sec.
Maybe you mean the first few rows show in 0.1s, this is possible.

In PostgreSQL the order by alone currently does not use the index.
Try:select * from auth where uid >= 0 order by uid;

if you only have positive uid's. This should use the index.

Andreas


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

Предыдущее
От: Adriaan Joubert
Дата:
Сообщение: Re: [HACKERS] Re: [GENERAL] Update of bitmask type
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] create rule changes table to view ?