From: | "Merlin Moncure" <mmoncure(at)gmail(dot)com> |
---|---|
To: | "Florian G(dot) Pflug" <fgp(at)phlo(dot)org> |
Cc: | emilu(at)encs(dot)concordia(dot)ca, pgsql-general(at)postgresql(dot)org |
Subject: | Re: in Pl/PgSQL, do commit every 5000 records |
Date: | 2006-03-13 14:55:09 |
Message-ID: | b42b73150603130655k3e2f7a1fu5c4967dee19a4dfa@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> >> In general, if you have the choice between looping over a large result
> >> in a stored procedure (or, even worse, in a client app) and letting the
> >> backend do the looping, then letting the backend handle it is nearly
> >> always
> >> faster.
There are different reasons why a large query might not always be the
best approach. Unfortunately it is the only approach on the server
side.
Large queries tend to become less and less practical when the database
becomes really big. Just as a 'for example', it would be nice to be
able to do part of a large complex job, stop it, and continue it again
later.
stored procedures (not functions) are suppoesed to give you this power
and allow you to do things which are non-transactional like vacuum.
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Agnes Bocchino | 2006-03-13 14:59:33 | Wal -long transaction |
Previous Message | Merlin Moncure | 2006-03-13 14:42:17 | Re: Any Delphi programmers on this list? |