| От | Mark Alliban |
|---|---|
| Тема | Re: Poor performance - need advice |
| Дата | |
| Msg-id | 007301bf6da9$912561b0$c80110ac@centauri обсуждение исходный текст |
| Ответ на | Poor performance - need advice ("Mark Alliban" <MarkA@idnltd.com>) |
| Список | pgsql-general |
>We have a table with 95,000 records, indexed on an int8 type (ClientNumber). >It is currently taking up to 10 seconds to retrieve one row based upon the >following statement: > >SELECT * FROM ClientTable WHERE ClientNumber=1234566789; > >The client numbers are random and there is currently no locking on the >database. I am running SCO OpenServer, PostgreSQL version 6.5.3. Is there >any way we can reduce the time taken by this query? I have tried an EXPLAIN of the above statement, and it tells me that Postgres is doing a Seq Scan on the table to return the results, even though it should be using the index. How can I make sure that it will always use the index when I specify ClientNumber?
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера