Re: Query plan optimization: sorting vs. partitioning

From: Sergey Zaharchenko <doublef(dot)mobile(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Query plan optimization: sorting vs. partitioning
Date: 2011-02-02 15:30:00
Message-ID: AANLkTi=byszq8WwPq6Tn7=h90+eHLdMCteyA2PQ4Wt2p@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2011/2/2, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

>> I see the database doesn't understand that there are no entries in the
>> main table, so it has to assume the Append data is not ordered. Is
>> there a way to avoid sorting?
>
> No. In existing releases there is no plan type that can produce
> presorted output from an append relation (ie, an inheritance tree).
> 9.1 will be able to do that, but it wasn't exactly a small fix:
> http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=11cad29c91524aac1d0b61e0ea0357398ab79bf8

OK, I hope I'll be able to come up with a stored procedure to query
the tables directly, then. Thanks!

--
DoubleF

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Torsten Zühlsdorff 2011-02-02 15:31:14 Re: Changing SHMMAX
Previous Message Tom Lane 2011-02-02 15:13:53 Re: Hot-Standby and sequences