Re: why Sequencial Scan when selecting on primary key of table?
В списке pgsql-performance по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: why Sequencial Scan when selecting on primary key of table? |
| Дата | |
| Msg-id | 21073.1054401227@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | why Sequencial Scan when selecting on primary key of table? ("Brian Tarbox" <btarbox@theworld.com>) |
| Ответы |
Re: why Sequencial Scan when selecting on primary key of table?
Re: why Sequencial Scan when selecting on primary key of table? |
| Список | pgsql-performance |
"Brian Tarbox" <btarbox@theworld.com> writes:
> When I say "explain select * from Patient where Patient_primary_key = 100"
> I get sequential scan.
Perhaps Patient_primary_key is not an integer field? If not, you need
to cast the constant 100 to the right type. Or write '100' with
single quotes around it, which leaves Postgres to choose the constant's
datatype. (Yeah, I know, it's a pain in the neck. We've had a lot of
discussions about how to fix this without breaking datatype extensibility;
no luck so far.)
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера