Re: usage for 'with recursive'?

From: Kenneth Downs <ken(at)secdat(dot)com>
To: hubert depesz lubaczewski <depesz(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: usage for 'with recursive'?
Date: 2007-03-05 13:51:23
Message-ID: 45EC205B.5090700@secdat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hubert depesz lubaczewski wrote:
> On 3/2/07, Kenneth Downs <ken(at)secdat(dot)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(at)postgresql(dot)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?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce McAlister 2007-03-05 14:06:21 Re: PostgreSQL 8.2.3 VACUUM Timings/Performance
Previous Message Laurent ROCHE 2007-03-05 13:47:37 Re : US Highschool database in postgres