Slony operates row based. It has no idea how many client side statements have 
created those rows. Or if any row was inserted, updated or deleted as a direct 
result of a client query, a stored procedure, a trigger or a cascaded foreign 
key operation.


Jan

--
Anyone who trades liberty for security deserves neither 
liberty nor security. -- Benjamin Franklin

Raghav <[email protected]> wrote:

>Hi,
>
>insert into stest values(generate_series(1,100));
>or
>insert into stest values (101),(102),(103);
>
>How does above two SQL statements treated and counted in
>sl_apply_stats.as_num_insert column ?
>
>I feel it should be considered as one INSERT statement, no ?,
>But it has multiplied the count even with generate_series.
>
>Test case:
>
>postgres=# select as_num_insert from _rep220.sl_apply_stats ;     //before
>insert
> as_num_insert
>---------------
>           0
>(1 row)
>
>postgres=# insert into stest values (generate_series(1,100));
>INSERT 0 100
>
>postgres=# select as_num_insert from _rep220.sl_apply_stats ;
> as_num_insert
>---------------
>           100
>(1 row)
>
>postgres=# insert into stest values (101),(102),(103);
>INSERT 0 3
>
>postgres=# select as_num_insert from _rep220.sl_apply_stats ;
> as_num_insert
>---------------
>           103
>(1 row)
>
>
>-- 
>Regards
>Raghav
>Blog: htt://raghavt.blogspot.com/
>
>_______________________________________________
>Slony1-general mailing list
>[email protected]
>http://lists.slony.info/mailman/listinfo/slony1-general
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general

Reply via email to