Re: Table partitioning based on multiple criterias possible?
От | Richard Huxton |
---|---|
Тема | Re: Table partitioning based on multiple criterias possible? |
Дата | |
Msg-id | 46E7B724.6020709@archonet.com обсуждение исходный текст |
Ответ на | Re: Table partitioning based on multiple criterias possible? (Ow Mun Heng <Ow.Mun.Heng@wdc.com>) |
Список | pgsql-general |
Ow Mun Heng wrote: > On Wed, 2007-09-12 at 09:42 +0100, Richard Huxton wrote: >> Well, I suppose you could partition over (month,product) but you >> probably don't want to. Sounds fiddly to manage. > > Yeah.. well current schema w/ everything in 1 table and the way things > are ordered, normalised design etc, is causing PG to calc stats wrongly > and i get a 1 to 500x ratio between plan and actual analysed rows which > is causing queries to run > 2 hours w/o returning results. (this was > tested w/ on tables w/ only ~3 million rows and joining another table w/ > another 3 million data - one to many relationship, I think, is causing > the mis-estimates.) Well, let's see the query + explain. It's not in one of your previous posts, is it? PG doesn't know about cross-column correlations, but you can usually get better than 500x out. Since it's taking > 2 hours to get a result we'll have to settle for explain rather than explain-analyse. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления: