From: Ioana Danes <ioanasoftware@yahoo.ca>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Jim C. Nasby <jim@nasby.net>
Cc: Dimitri Fontaine <dim@dalibo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgresql 8.1.4 - performance issues for select on
Date: Thu, 19 Oct 2006 07:43:55 -0400 (EDT)
Message-ID: <20061019114355.40671.qmail@web55911.mail.re3.yahoo.com> (raw)
In-Reply-To: <2694.1161212717@sss.pgh.pa.us>
Hello,
It looks like some of you missed my first email but my
problem is not to find a replacement for this select:
select max(transid) from someunionview
Thare are plenty of solutions for doing this...
My point is to split a tale in two and to make this
transparent for the developers as a first step. On the
second step they will improve some of the queries but
that is another story.
So I would like to know if there is any plan to
improve this type of query for views in the near
future, or maybe it is alredy improved in 8.2 version?
I have the same problem and question for:
select transid from someunionview order by transid
desc limit 1;
Thank you for your time,
Ioana Danes
--- Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Jeff Davis <pgsql@j-davis.com> writes:
> > If PostgreSQL could sort the result of a union by
> merging the results of
> > two index scans, I think the problem would be
> solved. Is there something
> > preventing this, or is it just something that
> needs to be added to the
> > planner?
>
> It's something on the wish-list. Personally I'd be
> inclined to try to
> rewrite the query as a plain MAX() across rewritten
> per-table indexed
> queries, rather than worry about mergesort or
> anything like that.
> There wasn't any very good way to incorporate that
> idea when planagg.c
> was first written, but now that the planner has an
> explicit notion of
> "append relations" it might be relatively
> straightforward.
>
> regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: ioanasoftware@yahoo.ca, tgl@sss.pgh.pa.us, pgsql@j-davis.com, jim@nasby.net, dim@dalibo.com
Subject: Re: Postgresql 8.1.4 - performance issues for select on
In-Reply-To: <20061019114355.40671.qmail@web55911.mail.re3.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox