| От | Tom Lane |
|---|---|
| Тема | Re: Bad performance of SELECT ... where id IN (...) |
| Дата | |
| Msg-id | 22763.1253984637@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Bad performance of SELECT ... where id IN (...) (Xia Qingran <qingran.xia@gmail.com>) |
| Ответы |
Re: Bad performance of SELECT ... where id IN (...)
|
| Список | pgsql-performance |
Xia Qingran <qingran.xia@gmail.com> writes:
> I have a big performance problem in my SQL select query:
> select * from event where user_id in
> (500,499,498, ... ,1,0);
> The above SELECT always spends 1200ms.
Your EXPLAIN ANALYZE shows that the actual runtime is only about 240ms.
So either the planning time is about 1000ms, or transmitting and
displaying the 134K rows produced by the query takes that long, or some
combination of the two. I wouldn't be too surprised if it's the data
display that's slow; but if it's the planning time that you're unhappy
about, updating to a more recent PG release might possibly help. What
version is this anyway?
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера