Jan Wieck janwieck at yahoo.com
Tue Jul 9 04:59:00 PDT 2013
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 <ragavendra.dba at gmail.com> 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
>Slony1-general at lists.slony.info
>http://lists.slony.info/mailman/listinfo/slony1-general
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.slony.info/pipermail/slony1-general/attachments/20130709/595cd448/attachment.htm 


More information about the Slony1-general mailing list