how to improve performance in libpq?

From: Tony Liao <tonyliao(at)yuehetone(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: how to improve performance in libpq?
Date: 2009-05-14 02:38:56
Message-ID: 8f750b7c0905131938i1be4339bu460d96ed8951d68a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,All,
I have a question in libpq.the postgresql dadabase about 32MB(base on
backup),and I tried to analyze query as :EXPLAIN ANALYZE SELECT
.........where id=123 ,got the total actual time is 2.882ms.
Now,I start a test programe base on ../src/test/examples/testlibpq.c
,which has 900 connection pools,and the id will be to increase for each
query.In total I test 160000 queries, used time 1012s. That seems a greate
different with 2.88ms/each query. any idea?
test environment :
database hardware CUP 2*Xeon 5405
MEMORY DDR2 16GB/800 with DIMM
HARDISK 160GB/8M SATA
network :LAN 1Gbps

configuration files:
max_connections = 3000
shared_buffers = 64MB
work_mem = 4MB
maintenance_work_mem = 4MB
max_stack_depth = 1MB
the others as default.

any idea?
I hope you can understand,thanks.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tony Liao 2009-05-14 05:24:01 Re: how to improve performance in libpq?
Previous Message Tom Lane 2009-05-13 16:44:01 Re: contrib modules script policy?