| От | Lew |
|---|---|
| Тема | Re: optimisation for a table with frequently used query |
| Дата | |
| Msg-id | SeudncuAW8ZfscHbnZ2dnUVZ_ualnZ2d@comcast.com обсуждение |
| Ответ на | Re: optimisation for a table with frequently used query (PFC <lists@peufeu.com>) |
| Ответы |
Re: optimisation for a table with frequently used query
|
| Список | pgsql-general |
danmcb wrote: >> SELECT * from my_table where id_1 = x and id_2 = y; >> Neither id_1 or id_2 or the combination of them is unique. I expect >> this table to become large over time. PFC wrote: > Create an index on (id_1, id_2), or (id_2,id_1). What are the strengths and weaknesses compared to creating two indexes, one on each column? I am guessing that changes to the table are slower with two indexes. How could it affect queries? What if the typical query pattern was more balanced among constraints on one column, on the other, and on both? -- Lew
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера