Re: usage for 'with recursive'? - Mailing list pgsql-general

From Kenneth Downs
Subject Re: usage for 'with recursive'?
Date
Msg-id 45EC205B.5090700@secdat.com
Whole thread Raw
In response to Re: usage for 'with recursive'?  ("hubert depesz lubaczewski" <depesz@gmail.com>)
List pgsql-general
hubert depesz lubaczewski wrote:
> On 3/2/07, Kenneth Downs <ken@secdat.com> wrote:
>> This reminds me of another advantage of the WITH RECURSIVE, which is
>> that it pushes to overhead to SELECT, with no associated write-time
>> overheads.
>
> hmm .. why do you consider this as advantage? i would say it's rather
> drawback.


One school of thought aims for overall system performance gains by
keeping transactions as small as possible.  WITH RECURSIVE allows an
UPDATE to affect exactly one row, where other methods affect more rows.
Therefore the WITH RECURSIVE gives you the smallest possible transaction
at write time.

Further, it seems the actual number of rows pulled in all approaches
should be the same, so now I wonder if there really even is any overhead
at SELECT time, making the argument for WITH RECURSIVE rather conclusive
I'd say.

>
> depesz
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly


--
Kenneth Downs
Secure Data Software, Inc.
www.secdat.com / www.andromeda-project.org
Office: 631-689-7200   Cell: 631-379-0010

::Think you may have a problem with programming? Ask yourself this
::question: do you worry about how to throw away a garbage can?


pgsql-general by date:

Previous
From: Laurent ROCHE
Date:
Subject: Re : US Highschool database in postgres
Next
From: Laurent ROCHE
Date:
Subject: Re : Re : COPY form stdin and file