Search Postgresql Archives

Re: in Pl/PgSQL, do commit every 5000 records

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  >> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux