| От | Dave Dutcher |
|---|---|
| Тема | Re: Query only slow on first run |
| Дата | |
| Msg-id | 05e801c831d7$bea1bee0$8e00a8c0@tridecap.com обсуждение исходный текст |
| Ответ на | Re: Query only slow on first run (tmp <skrald@amossen.dk>) |
| Ответы |
Re: Query only slow on first run
|
| Список | pgsql-performance |
> -----Original Message----- > From: tmp > We have primarily two tables of interest here: questions > (~100k rows) and posts (~400k rows). Each post refers to a > question, but only the "posts" rows for which the > corresponding "question.status = 1" are relevant. This > reduces the number of relevant question rows to about 10k. Earlier you said only a small subset of questions have a status of 1, so I assumed you meant like 100 not 10k :) According to the explain analyze there are only 646 rows in posts which match your criteria, so it does seem like scanning posts first might be the right thing to do.
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера