> I will try separate my huge data computation into several pieces
> something like:
[...]
> If I understood correctly, "begin ... exception when .. then ... end"
> can work the same way as commit. In another way, if commands in the
> sub-block (such as step1) run successfully, data in this part (
Hi Merlin,
>> 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 la
> >> 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 q
Emi Lu wrote:
>> Florian G. Pflug wrote:
>> < snipped code of stored procedure >
Are you aware of the "insert into (, ..., )
select , .., from "
command? It'd be much faster to use that it it's possible...
>>>
>>> It did faster. Thank you Florian. Could you hint me why "i
Emi Lu wrote:
Florian G. Pflug wrote:
< snipped code of stored procedure >
Are you aware of the "insert into (, ..., )
select , .., from "
command? It'd be much faster to use that it it's possible...
greetings, Florian Pflug
It did faster. Thank you Florian. Could you hint me why "i
Florian G. Pflug wrote:
< snipped code of stored procedure >
Are you aware of the "insert into (, ..., )
select , .., from "
command? It'd be much faster to use that it it's possible...
greetings, Florian Pflug
It did faster. Thank you Florian. Could you hint me why "insert into
Florian G. Pflug wrote:
Emi Lu wrote:
The example I have is:
CREATE OR REPLACE function test() returns boolean AS $$
DECLARE
... ...
counterINTEGER := 0;
BEGIN
... ...
query_value := ' .' ;
OPEN curs1 FOR EXECUTE query_value;
LOOP
FETCH curs1 INTO studid;
Emi Lu wrote:
The example I have is:
CREATE OR REPLACE function test() returns boolean AS $$
DECLARE
... ...
counterINTEGER := 0;
BEGIN
... ...
query_value := ' .' ;
OPEN curs1 FOR EXECUTE query_value;
LOOP
FETCH curs1 INTO studid;
EXIT WHEN NOT FOUND;
I got the answer. Although the compile passed, when it reaches 5000, the
commit command causes a "SPI_ERROR_TRANSACTION" exception.
Thank you for all your hint.
You can't do commits inside of a function.
The example I have is:
CREATE OR REPLACE function test() returns boolean AS $$
DECLAR
Hi Bruno,
You can't do commits inside of a function.
The example I have is:
CREATE OR REPLACE function test() returns boolean AS $$
DECLARE
... ...
counterINTEGER := 0;
BEGIN
... ...
query_value := ' .' ;
OPEN curs1 FOR EXECUTE query_value;
LOOP
FETCH curs1 I
On Fri, Mar 10, 2006 at 09:36:16 -0500,
Emi Lu <[EMAIL PROTECTED]> wrote:
> Good morning,
>
> In a plpgsql function, I am trying to insert 900, 000 records into
> several tables. I remembered people mentioned before that it is better
> and more efficient to commit actions for let's say every 5
11 matches
Mail list logo