| От | paul rivers |
|---|---|
| Тема | Re: Partitioned tables - planner wont use indexes |
| Дата | |
| Msg-id | 47F6D0E5.2050005@gmail.com обсуждение исходный текст |
| Ответ на | Partitioned tables - planner wont use indexes (kevin kempter <kevin@kevinkempterllc.com>) |
| Список | pgsql-performance |
kevin kempter wrote: > Hi List; > > Sorry if this is a dupe, my first post never showed up... > > I'm having some performance issues with a partitioned table. We have a > VERY large table that we've partitioned by day. > Unfortunately, that is the defined behavior in this case. From 5.9.6 of the manual: "Constraint exclusion only works when the query's WHERE clause contains constants." [Where the constants are of course your partitioning column(s)] The best way around this depends mostly on what you're up to. You can get the min tablename from the catalogs, or you can keep a table of active partitions that your script which drops off old partitions and generates new ones can keep updated on the oldest/newest partition dates. Or some number of other solutions, whatever you find cleanest for your purposes. Paul
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера