Re: why does this select hang postgres??? - Mailing list pgsql-general

From Steve Wolfe
Subject Re: why does this select hang postgres???
Date
Msg-id 009701c121c8$d1dbbfe0$50824e40@iboats.com
Whole thread Raw
In response to why does this select hang postgres???  (Jeremy Hansen <jeremy@xxedgexx.com>)
List pgsql-general
> select * from env_info,summary,plat_info;
>
> Is my statement broken?  Is this not legal?  Postgres just sits
there....
>
> My goal is to select everything from multiple tables with one sql
> statement.

   Without making comment on the legality of the SQL statement, simply
selecting everything from the tables is almost never a good idea, and most
tasks can almost always be done in a better manner.  Usually when I see
people doing that, they are doing the equivalent of an SQL join in their
program - and usually vastly less efficiently than the database would be
able to do it.  Other times, they're selecting everything, then throwing
away what they don't need, again, usually not as efficiently as the
database could do it, not to mention clobbering the system bus....

steve



pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: why does this select hang postgres???
Next
From: Jeremy Hansen
Date:
Subject: Re: why does this select hang postgres???