Re: [BUGS] Query causing explosion of temp space with join involving partitioning

2010-05-28 Thread Krzysztof Nienartowicz
and I set statistics on sources(srcid) to 1000 from default 10. It fixed the plan! Sources table was around 100M so skewness in this range must have been looking odd for the planner.. Thank you for the hints! Best Regards, Krzysztof On May 27, 2010, at 6:41 PM, Tom Lane wrote: > Krzysz

Re: [BUGS] Query causing explosion of temp space with join involving partitioning

2010-05-26 Thread Krzysztof Nienartowicz
l runtime: 585.566 ms (28 rows) Time: 588.102 ms Would be grateful for any pointers as the server restart is the only option now once such a query starts trashing the disk. Best Regards, Krzysztof Krzysztof Nienartowicz writes: > surveys-> SELECT t1.SURVEY_PK, t1.SOURC

[BUGS] Query causing explosion of temp space with join involving partitioning

2010-05-20 Thread Krzysztof Nienartowicz
Hello, Sorry for the re-post  - not sure list is the relevant one, I included slightly changed query in the previous message, sent to bugs list. I have an ORM-generated queries where parent table keys are used to fetch the records from the child table (with relevant FK indicies), where child tabl

[BUGS] Query causing explosion of temp space with join involving partitioning

2010-05-20 Thread Krzysztof Nienartowicz
Hello, I have an ORM-generated queries where parent table keys are used to fetch the records from the child table (with relevant FK indicies), where child table is partitioned. My understanding is that Postgres is unable to properly use constraint exclusion to query only a relevant table? Half of t