Re: PGSQL and Nested Loops

From: <operationsengineer1(at)yahoo(dot)com>
To: operationsengineer1(at)yahoo(dot)com, pgsql-novice(at)postgresql(dot)org
Subject: Re: PGSQL and Nested Loops
Date: 2005-09-05 23:36:39
Message-ID: 20050905233639.73416.qmail@web33307.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

--- operationsengineer1(at)yahoo(dot)com wrote:

> hi all, i read the followin gon slashdot...
>
> (*) Nested loops are like candy to SQL server, and
> I've heard this is the same for Sybase
> (understandably). Deep sets of nested loops will
> kick
> the other databases I've tested in the teeth. Given
> an
> instruction with several nested loops and 16 million
> rows of data, I got results from SQL server in 5
> minutes, results from Oracle 9 in an hour, and
> results
> from Postgres in 18 hours. This was a year ago and
> Postgres has changed, so it might be better now.
> Does
> MySQL handle them well?
>
> i don't see myself ever running into this kind of
> traffic, but i'm curious to know more about my db of
> choice - pgsql. is this person's assessment correct
> (for a year old version of pgsql) and has it
> improved
> since then?
>
> tia...

the author of the above at slashdot wrote this...

--
I'm a cut-n-paste SQL writer, so I may go off into
left field here quickly...

The condition I was referring to, which was called
nested looping by the DBAs and development lead at the
company I worked at, is the condition where one query
causes additional queries to be performed. Think
queries against dynamic view tables. In this case, the
nightmare query went four or five levels deep. I
recently saw an Oracle trace in which a data view was
unrolling to 88 levels deep...

Keep in mind this was over a year ago and it probably
doesn't represent best coding practice. However, the
most popular supported platform performed just fine
with it, which tends to make a company loathe to spend
much time finding workarounds for the other platforms.
--

since he's a cut and paste sql writer, i may have
jumped the gun since he may be doing everying wrong
and then complaining pgsql isn't as efficient as a
wrong to do things. ;-)

anyway, *if* his point is valid, i'd appreciate input.

thanks and i hope everyone is having a great holiday.



______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2005-09-06 01:05:50 Re: PGSQL and Nested Loops
Previous Message operationsengineer1 2005-09-05 23:29:30 PGSQL and Nested Loops