| От | Kevin Schroeder |
|---|---|
| Тема | Query problem fixed |
| Дата | |
| Msg-id | 006d01c325eb$eb72fdf0$0200a8c0@WORKSTATION обсуждение исходный текст |
| Ответы |
Re: Query problem fixed
|
| Список | pgsql-performance |
I figured out how to make the query faster. There should be a mailing list set up for wasted questions since I always seem to figure out the problem after I've bugged everyone for help. In the query select row_key, column1, column2, column3, column4, column5 from table1 where column6 = 1 order by column3 desc limit 21; I changed the index to message_index btree (column3, column6) rather than message_index btree (column6, column3, column7) Since the data was being ordered by column3 it seems to have sped the query up to 1 ms from 6000ms by making column 3 the first part of the index rather than the second. Kevin
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера