| От | Neil Dugan |
|---|---|
| Тема | possible bug with compound index. |
| Дата | |
| Msg-id | 1108352841.5086.23.camel@postgresql.localdomain обсуждение исходный текст |
| Ответы |
Re: possible bug with compound index.
|
| Список | pgsql-general |
I am using PostgreSQL 7.4.7
I have a table with serveral fields two of these are a serialno
(bigserial) and name(varchar). I have created two indexs on these
fields.
1) on name
2) on name,serialno
if I use the command
'select * from table order by name limit 1'
everything is OK
if I use the command
'select * from table order by name desc limit 1'
everything is OK
if I use the command
'select * from table order by name,serialno limit 1'
everything is OK
if I use the command
'select * from table order by name,serialno desc limit 1'
The command is SLOW and gives back the INCORRECT data.
Doing an 'explain' on the above query says that the index wasn't used.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера