Re: psql performance - Mailing list pgsql-general

From Michael Fuhr
Subject Re: psql performance
Date
Msg-id 20050415034648.GA70449@winnie.fuhr.org
Whole thread Raw
In response to Re: psql performance  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-general
On Thu, Apr 14, 2005 at 08:17:55PM -0700, Joshua D. Drake wrote:
> Joseph Shraibman wrote:
> >It doesn't matter what the query is.  The problem happens before it even
> >runs the query.  Just try pasting select
> >'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' union select
> >'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' union select
> >'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' union select
>
> I can not reproduce your problem on 8.0.2.

Nor I with 7.2.7, 7.3.9, 7.4.7, 8.0.2, or 8.1devel.

What happens if you edit the query with \e and then issue it, or
if you put the query in a file and use \i to read it?  Could you
tell us something about your environment -- OS, window manager,
terminal, etc.?

> >Incidentally when I did that I only got back one row.  What's up with that?

That's how UNION works:

http://www.postgresql.org/docs/7.4/interactive/queries-union.html

"Furthermore, it eliminates all duplicate rows, in the sense of
DISTINCT, unless UNION ALL is used."

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: psql performance
Next
From: Justin Hawkins
Date:
Subject: Assigning password to the superuser