pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Function execute slow down in 9.2
4+ messages / 2 participants
[nested] [flat]

* Function execute slow down in 9.2
@ 2013-08-12 14:59 Александр Белинский <avinfo79@gmail.com>
  2013-08-12 15:24 ` Re: Function execute slow down in 9.2 Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Александр Белинский @ 2013-08-12 14:59 UTC (permalink / raw)
  To: pgsql-performance

Hi!
I can't explain why function is slow down on same data.
Postgresql.conf the same, hardware is more powerful.
Diffrents is postgresql version

Here it;s my tests

Server 1 PSQL 9.1

FIRST RUN
EXPLAIN (ANALYZE, BUFFERS)  SELECT webclient.prc_ti_cache_alloc_dbl_update(
     21325134
);

'Result  (cost=0.00..0.26 rows=1 width=0) (actual 
time=1399.586..1399.587 rows=1 loops=1)'
'  Buffers: shared hit=40343 read=621'
'Total runtime: 1399.613 ms'

SECOND RUN
'Result  (cost=0.00..0.26 rows=1 width=0) (actual time=42.540..42.541 
rows=1 loops=1)'
'  Buffers: shared hit=37069'
'Total runtime: 42.558 ms'

THIRD RUN
'Result  (cost=0.00..0.26 rows=1 width=0) (actual time=198.893..198.894 
rows=1 loops=1)'
'  Buffers: shared hit=37069'
'Total runtime: 198.908 ms'


Server 2 PSQL 9.2

FIRST RUN
EXPLAIN (ANALYZE, BUFFERS)  SELECT webclient.prc_ti_cache_alloc_dbl_update(
     21325134
);

'Result  (cost=0.00..0.26 rows=1 width=0) (actual 
time=1328.103..1328.104 rows=1 loops=1)'
'  Buffers: shared hit=43081 read=233 written=36'
'Total runtime: 1328.129 ms'

SECOND RUN
'Result  (cost=0.00..0.26 rows=1 width=0) (actual 
time=1699.711..1699.712 rows=1 loops=1)'
'  Buffers: shared hit=42919'
'Total runtime: 1699.737 ms'

THIRD RUN
'Result  (cost=0.00..0.26 rows=1 width=0) (actual 
time=1907.947..1907.948 rows=1 loops=1)'
'  Buffers: shared hit=42869'
'Total runtime: 1907.965 ms'






-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Function execute slow down in 9.2
  2013-08-12 14:59 Function execute slow down in 9.2 Александр Белинский <avinfo79@gmail.com>
@ 2013-08-12 15:24 ` Pavel Stehule <pavel.stehule@gmail.com>
  2013-08-16 12:27   ` Re: Function execute slow down in 9.2 Александр Белинский <avinfo79@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Pavel Stehule @ 2013-08-12 15:24 UTC (permalink / raw)
  To: Александр Белинский <avinfo79@gmail.com>; +Cc: pgsql-performance

Hello

it looks like known issue of sometimes dysfunctional plan cache in
plpgsql in 9.2.

similar issue http://postgresql.1045698.n5.nabble.com/Performance-problem-in-PLPgSQL-td5764796.html

Regards

Pavel Stehule

2013/8/12 Александр Белинский <avinfo79@gmail.com>:
> Hi!
> I can't explain why function is slow down on same data.
> Postgresql.conf the same, hardware is more powerful.
> Diffrents is postgresql version
>
> Here it;s my tests
>
> Server 1 PSQL 9.1
>
> FIRST RUN
> EXPLAIN (ANALYZE, BUFFERS)  SELECT webclient.prc_ti_cache_alloc_dbl_update(
>     21325134
> );
>
> 'Result  (cost=0.00..0.26 rows=1 width=0) (actual time=1399.586..1399.587
> rows=1 loops=1)'
> '  Buffers: shared hit=40343 read=621'
> 'Total runtime: 1399.613 ms'
>
> SECOND RUN
> 'Result  (cost=0.00..0.26 rows=1 width=0) (actual time=42.540..42.541 rows=1
> loops=1)'
> '  Buffers: shared hit=37069'
> 'Total runtime: 42.558 ms'
>
> THIRD RUN
> 'Result  (cost=0.00..0.26 rows=1 width=0) (actual time=198.893..198.894
> rows=1 loops=1)'
> '  Buffers: shared hit=37069'
> 'Total runtime: 198.908 ms'
>
>
> Server 2 PSQL 9.2
>
> FIRST RUN
> EXPLAIN (ANALYZE, BUFFERS)  SELECT webclient.prc_ti_cache_alloc_dbl_update(
>     21325134
> );
>
> 'Result  (cost=0.00..0.26 rows=1 width=0) (actual time=1328.103..1328.104
> rows=1 loops=1)'
> '  Buffers: shared hit=43081 read=233 written=36'
> 'Total runtime: 1328.129 ms'
>
> SECOND RUN
> 'Result  (cost=0.00..0.26 rows=1 width=0) (actual time=1699.711..1699.712
> rows=1 loops=1)'
> '  Buffers: shared hit=42919'
> 'Total runtime: 1699.737 ms'
>
> THIRD RUN
> 'Result  (cost=0.00..0.26 rows=1 width=0) (actual time=1907.947..1907.948
> rows=1 loops=1)'
> '  Buffers: shared hit=42869'
> 'Total runtime: 1907.965 ms'
>
>
>
>
>
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Function execute slow down in 9.2
  2013-08-12 14:59 Function execute slow down in 9.2 Александр Белинский <avinfo79@gmail.com>
  2013-08-12 15:24 ` Re: Function execute slow down in 9.2 Pavel Stehule <pavel.stehule@gmail.com>
@ 2013-08-16 12:27   ` Александр Белинский <avinfo79@gmail.com>
  2013-08-21 09:03     ` Re: Function execute slow down in 9.2 Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Александр Белинский @ 2013-08-16 12:27 UTC (permalink / raw)
  To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: pgsql-performance

12.08.2013 18:24, Pavel Stehule пишет:
> Hello
>
> it looks like known issue of sometimes dysfunctional plan cache in
> plpgsql in 9.2.
>
> similar issuehttp://postgresql.1045698.n5.nabble.com/Performance-problem-in-PLPgSQL-td5764796.html
Thanks for the link ) I read about issue, but I can't understand what 
should I do?

i chage values of seq_page_cost
=1.0
=10.0
= 100.0
= 0.1
=0.01

  but nothing chage, time of function execution the same.







-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Function execute slow down in 9.2
  2013-08-12 14:59 Function execute slow down in 9.2 Александр Белинский <avinfo79@gmail.com>
  2013-08-12 15:24 ` Re: Function execute slow down in 9.2 Pavel Stehule <pavel.stehule@gmail.com>
  2013-08-16 12:27   ` Re: Function execute slow down in 9.2 Александр Белинский <avinfo79@gmail.com>
@ 2013-08-21 09:03     ` Pavel Stehule <pavel.stehule@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Pavel Stehule @ 2013-08-21 09:03 UTC (permalink / raw)
  To: Александр Белинский <avinfo79@gmail.com>; +Cc: pgsql-performance

2013/8/16 Александр Белинский <avinfo79@gmail.com>

> 12.08.2013 18:24, Pavel Stehule пишет:
>
>  Hello
>>
>> it looks like known issue of sometimes dysfunctional plan cache in
>> plpgsql in 9.2.
>>
>> similar issuehttp://postgresql.**1045698.n5.nabble.com/**
>> Performance-problem-in-**PLPgSQL-td5764796.html<http://postgresql.1045698.n5.nabble.com/Performance-problem-in-PLPgSQL-td5764796.html;
>>
> Thanks for the link ) I read about issue, but I can't understand what
> should I do?
>
>
You can do nothing. You can check, so described issue is same as your
issue, and that is all :(.

It is bug in plan cache implementation.

Regards

Pavel


> i chage values of seq_page_cost
> =1.0
> =10.0
> = 100.0
> = 0.1
> =0.01
>
>  but nothing chage, time of function execution the same.
>
>
>
>
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2013-08-21 09:03 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-08-12 14:59 Function execute slow down in 9.2 Александр Белинский <avinfo79@gmail.com>
2013-08-12 15:24 ` Pavel Stehule <pavel.stehule@gmail.com>
2013-08-16 12:27   ` Александр Белинский <avinfo79@gmail.com>
2013-08-21 09:03     ` Pavel Stehule <pavel.stehule@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox