Re: [PERFORM] Partitioned Tables and ORDER BY

2009-10-22 Thread Scott Carey
On 10/19/09 12:10 PM, "Robert Haas" wrote: > 2009/10/19 Grzegorz Jaśkiewicz : >> >> >> 2009/10/19 Robert Haas >>> >>> 2009/10/19 Grzegorz Jaśkiewicz : On Sun, Oct 11, 2009 at 3:30 PM, Michal Szymanski wrote: > > We have similar problem and now we are try to f

Re: [PERFORM] Partitioned Tables and ORDER BY

2009-10-19 Thread Robert Haas
2009/10/19 Grzegorz Jaśkiewicz : > > > 2009/10/19 Robert Haas >> >> 2009/10/19 Grzegorz Jaśkiewicz : >> > >> > >> > On Sun, Oct 11, 2009 at 3:30 PM, Michal Szymanski >> > wrote: >> >> >> >> We have similar problem and now we are try to find solution. When you >> >> execute query on partion there

Re: [PERFORM] Partitioned Tables and ORDER BY

2009-10-19 Thread Craig James
Joe Uhl wrote: This seems like a pretty major weakness in PostgreSQL partitioning. I have essentially settled on not being able to do queries against the parent table when I want to order the results. Going to have to use a Hibernate interceptor or something similar to rewrite the statements

Re: [PERFORM] Partitioned Tables and ORDER BY

2009-10-19 Thread Grzegorz Jaśkiewicz
2009/10/19 Robert Haas > 2009/10/19 Grzegorz Jaśkiewicz : > > > > > > On Sun, Oct 11, 2009 at 3:30 PM, Michal Szymanski > > wrote: > >> > >> We have similar problem and now we are try to find solution. When you > >> execute query on partion there is no sorting - DB use index to > >> retrieve dat

Re: [PERFORM] Partitioned Tables and ORDER BY

2009-10-19 Thread Robert Haas
2009/10/19 Grzegorz Jaśkiewicz : > > > On Sun, Oct 11, 2009 at 3:30 PM, Michal Szymanski > wrote: >> >> We have similar problem and now we are try to find solution. When you >> execute query on partion there is no sorting - DB use index to >> retrieve data and if you need let say 50 rows it reads

Re: [PERFORM] Partitioned Tables and ORDER BY

2009-10-19 Thread Grzegorz Jaśkiewicz
On Sun, Oct 11, 2009 at 3:30 PM, Michal Szymanski wrote: > We have similar problem and now we are try to find solution. When you > execute query on partion there is no sorting - DB use index to > retrieve data and if you need let say 50 rows it reads 50 rows using > index. But when you execute on

Re: [PERFORM] Partitioned Tables and ORDER BY

2009-10-18 Thread Joe Uhl
This seems like a pretty major weakness in PostgreSQL partitioning. I have essentially settled on not being able to do queries against the parent table when I want to order the results. Going to have to use a Hibernate interceptor or something similar to rewrite the statements so they hit spe

Re: [PERFORM] Partitioned Tables and ORDER BY

2009-10-17 Thread Michal Szymanski
I've described our problem here http://groups.google.pl/group/pgsql.performance/browse_thread/thread/54a7419381bd1565?hl=pl# Michal Szymanski http://blog.szymanskich.net http://techblog.freeconet.pl/ -- Sent via pgsql-performance mailing list ([email protected]) To make changes t

Re: [PERFORM] Partitioned Tables and ORDER BY

2009-10-17 Thread Michal Szymanski
We have similar problem and now we are try to find solution. When you execute query on partion there is no sorting - DB use index to retrieve data and if you need let say 50 rows it reads 50 rows using index. But when you execute on parent table query optymizer do this: -> Sort (cost=726844.88