Re: [PERFORM] assignment vs SELECT INTO

2014-11-03 Thread Andrew Dunstan
On 11/03/2014 03:24 PM, Tom Lane wrote: Andrew Dunstan writes: andrew=# do $x$ declare r abc; begin for i in 1 .. 1000 loop select 'a','b',i into r.x,r.y,r.z; end loop; end; $x$; DO Time: 63731.434 ms andrew=# do $x$ declare r abc; begin for i in 1 .. 1000 loop

Re: [PERFORM] assignment vs SELECT INTO

2014-11-03 Thread Matheus de Oliveira
On Mon, Nov 3, 2014 at 6:00 PM, Andrew Dunstan wrote: >andrew=# do $x$ declare r abc; begin for i in 1 .. 1000 loop >select 'a','b',i into r.x,r.y,r.z; end loop; end; $x$; >DO >Time: 63731.434 ms >andrew=# do $x$ declare r abc; begin for i in 1 .. 1000 loop r >:= (

Re: [PERFORM] assignment vs SELECT INTO

2014-11-03 Thread Tom Lane
Andrew Dunstan writes: > andrew=# do $x$ declare r abc; begin for i in 1 .. 1000 loop > select 'a','b',i into r.x,r.y,r.z; end loop; end; $x$; > DO > Time: 63731.434 ms > andrew=# do $x$ declare r abc; begin for i in 1 .. 1000 loop r > := ('a','b',i); end loop; end;

[PERFORM] assignment vs SELECT INTO

2014-11-03 Thread Andrew Dunstan
I found out today that direct assignment to a composite type is (at least in my test) about 70% faster than setting it via SELECT INTO. That seems like an enormous difference in speed, which I haven't really been able to account for. Test case: andrew=# \d abc Table "public.abc

Re: [PERFORM] Replication Lag Causes

2014-11-03 Thread Felipe Santos
2014-11-02 19:16 GMT-02:00 Mike Wilson : > Thanks for the information Greg. > > Unfortunately modifying the application stack this close to the holiday > season won’t be an option so I’m left with: >1) Trying to optimize the settings I have for the query mix I have. >2) Optimize any long r