Re: 1- and 2-dimensional indexes on same column: why is the 2d one preferred?
В списке pgsql-general по дате отправления:
| От | Marinos Yannikos |
|---|---|
| Тема | Re: 1- and 2-dimensional indexes on same column: why is the 2d one preferred? |
| Дата | |
| Msg-id | 49C8DB24.8020704@geizhals.at обсуждение |
| Ответ на | Re: 1- and 2-dimensional indexes on same column: why is the 2d one preferred? (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
Tom Lane schrieb: > Marinos Yannikos <mjy@geizhals.at> writes: >> "i_a" btree (a) >> "i_ab" btree (a, b) > > I suspect that these indexes are exactly the same size --- look at > pg_class.relpages or use the pg_relation_size() function to verify. For some reason, the first one is actually about twice the size of the second (175458 relpages vs. 88186, pg_relation_size() confirms it). > It wouldn't > really matter anyway because the actual runtime should be pretty > much the same too. The runtime is unfortunately worse in some cases due to the degradation we've been seeing (lots of INSERT/UPDATE on this table), but I think we fixed this with nightly REINDEX runs on the 2-dimensional indexes (which is probably also the reason for the odd sizes above). I guess we can just drop the first index then. Thanks, -mjy
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера