pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Please Help: PostgreSQL performance Optimization
6+ messages / 4 participants
[nested] [flat]

* Please Help: PostgreSQL performance Optimization
@ 2006-01-12 00:32 Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
  2006-01-13 17:41 ` Re: Please Help: PostgreSQL performance Optimization Frank Wiles <frank@wiles.org>
  0 siblings, 1 reply; 6+ messages in thread

From: Jamal Ghaffour @ 2006-01-12 00:32 UTC (permalink / raw)
  To: pgsql-performance

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<pre style="margin: 0em;">Hi,
<font face="Arial, Helvetica, sans-serif">
I'm working on a project, whose implementation deals with PostgreSQL. A brief description of our application is given  below.</font>

I'm running version 8.0 on a dedicated  server 1Gb of RAM. 
my database isn't complex, it contains just 2 simple tables.
<tt>
CREATE TABLE cookies (
    domain varchar(50) NOT NULL,
    path varchar(50) NOT NULL,
    name varchar(50) NOT NULL,
    principalid varchar(50) NOT NULL,
    host text NOT NULL,
    value text NOT NULL,
    secure bool NOT NULL,
    timestamp timestamp with time zone NOT NULL DEFAULT 
CURRENT_TIMESTAMP+TIME '04:00:00',
    PRIMARY KEY  (domain,path,name,principalid)
)

CREATE TABLE liberty (
    principalid varchar(50) NOT NULL,
    requestid varchar(50) NOT NULL,
    spassertionurl text NOT NULL,
    libertyversion  varchar(50) NOT NULL,
    relaystate  varchar(50) NOT NULL,
    PRIMARY KEY  (principalid)
)

</tt>I'm developping an application that uses the libpqxx to execute 
psql queries on the database and have to execute 500 requests at the same time.

<tt>
UPDATE cookies SET host='ping.icap-elios.com', value= '54E5B5491F27C0177083795F2E09162D', secure=FALSE, 
timestamp=CURRENT_TIMESTAMP+INTERVAL '14400 SECOND' WHERE 
domain='ping.icap-elios.com' AND path='/tfs' AND principalid='192.168.8.219' AND 
name='jsessionid'</tt>

<tt>SELECT path, upper(name) AS name, value FROM cookies  WHERE timestamp&lt;CURRENT_TIMESTAMP AND principalid='192.168.8.219' AND 
secure=FALSE AND (domain='ping.icap-elios.com' OR domain='.icap-elios.com')</tt>

I have to notify that the performance of is extremely variable and irregular.
I can also see that the server process uses almost 100% of
a CPU.

I'm using the default configuration file, and i m asking if i have to change some paramters to have a good performance.

Any help would be greatly appreciated.

Thanks,
</pre>
</body>
</html>




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

* Re: Please Help: PostgreSQL performance Optimization
  2006-01-12 00:32 Please Help: PostgreSQL performance Optimization Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
@ 2006-01-13 17:41 ` Frank Wiles <frank@wiles.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Frank Wiles @ 2006-01-13 17:41 UTC (permalink / raw)
  To: Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>; +Cc: pgsql-performance

On Thu, 12 Jan 2006 01:32:10 +0100
Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr> wrote:

> I'm using the default configuration file, and i m asking if i have to
> change some paramters to have a good performance.

  In general the answer is yes.  The default is a pretty good best guess
  at what sorts of values work for your "typical system", but if you run
  into performance problems the config file is where you should look
  first, provided you've done the simple things like adding good
  indexes, vacumm analyze, etc. 

  You'll want to consult the following various documentation out there
  to help your properly tune your configuration: 

  http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html
  http://www.powerpostgresql.com/Docs
  http://www.powerpostgresql.com/PerfList
  http://www.revsys.com/writings/postgresql-performance.html

  Hopefully these will help you understand how to set your configuration
  values. 

 ---------------------------------
   Frank Wiles <frank@wiles.org>
   http://www.wiles.org
 ---------------------------------




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

* Re: Please Help: PostgreSQL performance Optimization
@ 2006-01-12 14:53 Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
  2006-01-12 18:42 ` Re: Please Help: PostgreSQL performance Optimization Andrew Lazarus <andrew@pillette.com>
  2006-01-12 20:16 ` Re: Please Help: PostgreSQL performance Optimization Jaime Casanova <systemguards@gmail.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Jamal Ghaffour @ 2006-01-12 14:53 UTC (permalink / raw)
  To: Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>; pgsql-performance

This is a multi-part message in MIME format.
--------------060805020108060506070404
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Jamal Ghaffour a &eacute;crit&nbsp;:
<blockquote cite="mid43C66742.9060104@elios-informatique.fr" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
  <font><font color="#000000">
  <pre style="margin: 0em;">Hi,
<font face="Arial, Helvetica, sans-serif">
I'm working on a project, whose implementation deals with PostgreSQL. A brief description of our application is given  below.</font>

I'm running version 8.0 on a dedicated  server 1Gb of RAM. 
my database isn't complex, it contains just 2 simple tables.
<tt>
CREATE TABLE cookies (
    domain varchar(50) NOT NULL,
    path varchar(50) NOT NULL,
    name varchar(50) NOT NULL,
    principalid varchar(50) NOT NULL,
    host text NOT NULL,
    value text NOT NULL,
    secure bool NOT NULL,
    timestamp timestamp with time zone NOT NULL DEFAULT 
CURRENT_TIMESTAMP+TIME '04:00:00',
    PRIMARY KEY  (domain,path,name,principalid)
)

CREATE TABLE liberty (
    principalid varchar(50) NOT NULL,
    requestid varchar(50) NOT NULL,
    spassertionurl text NOT NULL,
    libertyversion  varchar(50) NOT NULL,
    relaystate  varchar(50) NOT NULL,
    PRIMARY KEY  (principalid)
)

</tt>I'm developping an application that uses the libpqxx to execute 
psql queries on the database and have to execute 500 requests at the same time.

<tt>
UPDATE cookies SET host='ping.icap-elios.com', value= '54E5B5491F27C0177083795F2E09162D', secure=FALSE, 
timestamp=CURRENT_TIMESTAMP+INTERVAL '14400 SECOND' WHERE 
domain='ping.icap-elios.com' AND path='/tfs' AND principalid='192.168.8.219' AND 
name='jsessionid'</tt>

<tt>SELECT path, upper(name) AS name, value FROM cookies  WHERE timestamp&lt;CURRENT_TIMESTAMP AND principalid='192.168.8.219' AND 
secure=FALSE AND (domain='ping.icap-elios.com' OR domain='.icap-elios.com')</tt>

I have to notify that the performance of is extremely variable and irregular.
I can also see that the server process uses almost 100% of
a CPU.

I'm using the default configuration file, and i m asking if i have to change some paramters to have a good performance.

Any help would be greatly appreciated.

Thanks,</pre>
  </font></font>
</blockquote>
Hi,<br>
<br>
There are some results that can give you <span class="def-example">concrete&nbsp;</span>
idea about my problem: <br>
when i 'm launching my test that executes in loop manner the&nbsp; SELECT
and UPDATE queries described above, i'm obtaining this results:<br>
<br>
UPDATE Time execution :0s: 5225 us<br>
SELECT Time execution&nbsp; :0s: 6908 us<br>
<br>
5 minutes Later: <br>
<br>
UPDATE Time execution :0s: 6125 us<br>
SELECT Time execution&nbsp; :0s: 10928 us<br>
<br>
5 minutes Later: <br>
<br>
UPDATE Time execution :0s: 5825 us<br>
SELECT Time execution&nbsp; :0s: 14978 us<br>
<br>
As you can see , the time execution of the SELECT request is growing
relatively to time and not the UPDATE time execution. <br>
&nbsp;I note that to stop the explosion of the Select time execution, i m
using frequently the vaccum query on the cookies table.<br>
Set&nbsp; the&nbsp; autovacuum parmaeter in the configuation file to on wasn't
able to remplace the use of the vaccum command, and i don't know if
this behaivour is normal?<br>
<br>
Thanks,<br>
Jamal<br>
</body>
</html>

--------------060805020108060506070404
Content-Type: text/x-vcard; charset=utf-8;
 name="Jamal.Ghaffour.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="Jamal.Ghaffour.vcf"

begin:vcard
fn:Jamal Ghaffour
n:Ghaffour;Jamal
org:ELIOS Informatique
adr;quoted-printable:;;1, sq de ch=C3=AAne Germain,;CESSON SEVIGNE;;35510;FRANCE
email;internet:Jamal.Ghaffour@elios-informatique.fr
tel;work:(+33) 2.99.63.85.30
tel;fax:(+33) 2.99.63.85.93
tel;home:(+33) 2 99 36 73 96
tel;cell:(+33) 6.21.85.15.91
url:http://www.elios-informatique.fr
version:2.1
end:vcard


--------------060805020108060506070404--



Attachments:

Jamal.Ghaffour.vcf (text/x-vcard, 376B) download begin:vcard fn:Jamal Ghaffour n:Ghaffour;Jamal org:ELIOS Informatique adr;quoted-printable:;;1, sq de ch=C3=AAne Germain,;CESSON SEVIGNE;;35510;FRANCE email;internet:Jamal.Ghaffour@elios-informatique.fr tel;work:(+33) 2.99.63.85.30 tel;fax:(+33) 2.99.63.85.93 tel;home:(+33) 2 99 36 73 96 tel;cell:(+33) 6.21.85.15.91 url:http://www.elios-informatique.fr version:2.1 end:vcard
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: Please Help: PostgreSQL performance Optimization
  2006-01-12 14:53 Re: Please Help: PostgreSQL performance Optimization Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
@ 2006-01-12 18:42 ` Andrew Lazarus <andrew@pillette.com>
  2006-01-13 09:13   ` Re: Please Help: PostgreSQL performance Optimization Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
  1 sibling, 1 reply; 6+ messages in thread

From: Andrew Lazarus @ 2006-01-12 18:42 UTC (permalink / raw)
  To: Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>; +Cc: pgsql-performance

Jamal Ghaffour wrote:

>>CREATE TABLE cookies (
>>    domain varchar(50) NOT NULL,
>>    path varchar(50) NOT NULL,
>>    name varchar(50) NOT NULL,
>>    principalid varchar(50) NOT NULL,
>>    host text NOT NULL,
>>    value text NOT NULL,
>>    secure bool NOT NULL,
>>    timestamp timestamp with time zone NOT NULL DEFAULT 
>>CURRENT_TIMESTAMP+TIME '04:00:00',
>>    PRIMARY KEY  (domain,path,name,principalid)
>>)
[snip]
>>SELECT path, upper(name) AS name, value FROM cookies  WHERE timestamp<CURRENT_TIMESTAMP AND principalid='192.168.8.219' AND 
>>secure=FALSE AND (domain='ping.icap-elios.com' OR domain='.icap-elios.com')

I think the problem here is that the column order in the index doesn't 
match the columns used in the WHERE clause criteria. Try adding an index 
on (domain,principalid) or (domain,principalid,timestamp). If these are 
your only queries, you can get the same effect by re-ordering the 
columns in the table so that this is the column order used by the 
primary key and its implicit index.

You should check up on EXPLAIN and EXPLAIN ANALYZE to help you debug 
slow queries.

Attachments:

andrew.vcf (text/x-vcard, 296B) download begin:vcard fn:Andrew Lazarus n:Lazarus;Andrew org:Pillette Investment Management;Research and Development adr;dom:;;3028 Fillmore;San Francisco;CA;94123 email;internet:andrew@pillette.com title:Director tel;work:800-366-0688 tel;fax:415-440-4093 url:http://www.pillette.com version:2.1 end:vcard
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: Please Help: PostgreSQL performance Optimization
  2006-01-12 14:53 Re: Please Help: PostgreSQL performance Optimization Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
  2006-01-12 18:42 ` Re: Please Help: PostgreSQL performance Optimization Andrew Lazarus <andrew@pillette.com>
@ 2006-01-13 09:13   ` Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
  0 siblings, 0 replies; 6+ messages in thread

From: Jamal Ghaffour @ 2006-01-13 09:13 UTC (permalink / raw)
  To: andrew@pillette.com; +Cc: pgsql-performance; systemguards@gmail.com

Andrew Lazarus a écrit :

> Jamal Ghaffour wrote:
>
>>> CREATE TABLE cookies (
>>>    domain varchar(50) NOT NULL,
>>>    path varchar(50) NOT NULL,
>>>    name varchar(50) NOT NULL,
>>>    principalid varchar(50) NOT NULL,
>>>    host text NOT NULL,
>>>    value text NOT NULL,
>>>    secure bool NOT NULL,
>>>    timestamp timestamp with time zone NOT NULL DEFAULT 
>>> CURRENT_TIMESTAMP+TIME '04:00:00',
>>>    PRIMARY KEY  (domain,path,name,principalid)
>>> )
>>
> [snip]
>
>>> SELECT path, upper(name) AS name, value FROM cookies  WHERE 
>>> timestamp<CURRENT_TIMESTAMP AND principalid='192.168.8.219' AND 
>>> secure=FALSE AND (domain='ping.icap-elios.com' OR 
>>> domain='.icap-elios.com')
>>
>
> I think the problem here is that the column order in the index doesn't 
> match the columns used in the WHERE clause criteria. Try adding an 
> index on (domain,principalid) or (domain,principalid,timestamp). If 
> these are your only queries, you can get the same effect by 
> re-ordering the columns in the table so that this is the column order 
> used by the primary key and its implicit index.
>
> You should check up on EXPLAIN and EXPLAIN ANALYZE to help you debug 
> slow queries.

Hi,
I created an index into the cookies table
CREATE INDEX index_cookies_select ON cookies (domain, principalid, 
timestamp);
and execute my UPDATE and select queries:

1 - The first select quey give the following results:

icap=# EXPLAIN ANALYZE SELECT path, upper(name) AS name, value FROM 
cookies WHERE timestamp>CURRENT_TIMESTAMP AND 
principalid='192.168.8.219' AND secure=FALSE AND 
(domain='ping.icap-elios.com' OR domain='.icap-elios.com');
                                                                                                                                    
QUERY 
PLAN                                                                                                                              

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on cookies  (cost=4.02..8.04 rows=1 width=268) (actual 
time=0.107..0.108 rows=1 loops=1)
   Recheck Cond: (((("domain")::text = 'ping.icap-elios.com'::text) AND 
((principalid)::text = '192.168.8.219'::text) AND ("timestamp" > now())) 
OR ((("domain")::text = '.icap-elios.com'::text) AND 
((principalid)::text = '192.168.8.219'::text) AND ("timestamp" > now())))
   Filter: (("timestamp" > now()) AND (NOT secure))
   ->  BitmapOr  (cost=4.02..4.02 rows=1 width=0) (actual 
time=0.091..0.091 rows=0 loops=1)
         ->  Bitmap Index Scan on index_cookies_select  (cost=0.00..2.01 
rows=1 width=0) (actual time=0.077..0.077 rows=1 loops=1)
               Index Cond: ((("domain")::text = 
'ping.icap-elios.com'::text) AND ((principalid)::text = 
'192.168.8.219'::text) AND ("timestamp" > now()))
         ->  Bitmap Index Scan on index_cookies_select  (cost=0.00..2.01 
rows=1 width=0) (actual time=0.012..0.012 rows=0 loops=1)
               Index Cond: ((("domain")::text = '.icap-elios.com'::text) 
AND ((principalid)::text = '192.168.8.219'::text) AND ("timestamp" > now()))
 Total runtime: 0.155 ms
(9 rows)
 
2- After that, i launch my test code  that execute continuely the UPDATE 
and select queries (in loop manner), after 1 minute of continuous 
execution, i obtain the following result:
icap=# EXPLAIN ANALYZE SELECT path, upper(name) AS name, value FROM 
cookies WHERE timestamp>CURRENT_TIMESTAMP AND 
principalid='192.168.8.219' AND secure=FALSE AND 
(domain='ping.icap-elios.com' OR domain='.icap-elios.com');
                                                                                                                                    
QUERY 
PLAN                                                                                                                              

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on cookies  (cost=4.02..8.04 rows=1 width=268) (actual 
time=39.545..39.549 rows=1 loops=1)
   Recheck Cond: (((("domain")::text = 'ping.icap-elios.com'::text) AND 
((principalid)::text = '192.168.8.219'::text) AND ("timestamp" > now())) 
OR ((("domain")::text = '.icap-elios.com'::text) AND 
((principalid)::text = '192.168.8.219'::text) AND ("timestamp" > now())))
   Filter: (("timestamp" > now()) AND (NOT secure))
   ->  BitmapOr  (cost=4.02..4.02 rows=1 width=0) (actual 
time=39.512..39.512 rows=0 loops=1)
         ->  Bitmap Index Scan on index_cookies_select  (cost=0.00..2.01 
rows=1 width=0) (actual time=39.471..39.471 rows=2 loops=1)
               Index Cond: ((("domain")::text = 
'ping.icap-elios.com'::text) AND ((principalid)::text = 
'192.168.8.219'::text) AND ("timestamp" > now()))
         ->  Bitmap Index Scan on index_cookies_select  (cost=0.00..2.01 
rows=1 width=0) (actual time=0.036..0.036 rows=0 loops=1)
               Index Cond: ((("domain")::text = '.icap-elios.com'::text) 
AND ((principalid)::text = '192.168.8.219'::text) AND ("timestamp" > now()))
 Total runtime: 39.616 ms
(9 rows)

I notice that the time execution increases significantly.  and i need 
the vacuum query to obtain normal time execution:


3- After vacuum execution:
icap=# vacuum cookies;
VACUUM
icap=# EXPLAIN ANALYZE SELECT path, upper(name) AS name, value FROM 
cookies WHERE timestamp>CURRENT_TIMESTAMP AND 
principalid='192.168.8.219' AND secure=FALSE AND 
(domain='ping.icap-elios.com' OR domain='.icap-elios.com');
                                                                                                                                    
QUERY 
PLAN                                                                                                                              

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on cookies  (cost=4.02..8.04 rows=1 width=268) (actual 
time=0.111..0.112 rows=1 loops=1)
   Recheck Cond: (((("domain")::text = 'ping.icap-elios.com'::text) AND 
((principalid)::text = '192.168.8.219'::text) AND ("timestamp" > now())) 
OR ((("domain")::text = '.icap-elios.com'::text) AND 
((principalid)::text = '192.168.8.219'::text) AND ("timestamp" > now())))
   Filter: (("timestamp" > now()) AND (NOT secure))
   ->  BitmapOr  (cost=4.02..4.02 rows=1 width=0) (actual 
time=0.095..0.095 rows=0 loops=1)
         ->  Bitmap Index Scan on index_cookies_select  (cost=0.00..2.01 
rows=1 width=0) (actual time=0.081..0.081 rows=1 loops=1)
               Index Cond: ((("domain")::text = 
'ping.icap-elios.com'::text) AND ((principalid)::text = 
'192.168.8.219'::text) AND ("timestamp" > now()))
         ->  Bitmap Index Scan on index_cookies_select  (cost=0.00..2.01 
rows=1 width=0) (actual time=0.012..0.012 rows=0 loops=1)
               Index Cond: ((("domain")::text = '.icap-elios.com'::text) 
AND ((principalid)::text = '192.168.8.219'::text) AND ("timestamp" > now()))
 Total runtime: 0.159 ms
(9 rows)



Thanks,
Jamal

Attachments:

Jamal.Ghaffour.vcf (text/x-vcard, 376B) download begin:vcard fn:Jamal Ghaffour n:Ghaffour;Jamal org:ELIOS Informatique adr;quoted-printable:;;1, sq de ch=C3=AAne Germain,;CESSON SEVIGNE;;35510;FRANCE email;internet:Jamal.Ghaffour@elios-informatique.fr tel;work:(+33) 2.99.63.85.30 tel;fax:(+33) 2.99.63.85.93 tel;home:(+33) 2 99 36 73 96 tel;cell:(+33) 6.21.85.15.91 url:http://www.elios-informatique.fr version:2.1 end:vcard
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: Please Help: PostgreSQL performance Optimization
  2006-01-12 14:53 Re: Please Help: PostgreSQL performance Optimization Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
@ 2006-01-12 20:16 ` Jaime Casanova <systemguards@gmail.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Jaime Casanova @ 2006-01-12 20:16 UTC (permalink / raw)
  To: Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>; +Cc: pgsql-performance

On 1/12/06, Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr> wrote:
> Jamal Ghaffour a écrit :
> Hi,

I'm working on a project, whose implementation deals with PostgreSQL. A
> brief description of our application is given below.

I'm running version
> 8.0 on a dedicated server 1Gb of RAM.
my database isn't complex, it
> contains just 2 simple tables.

CREATE TABLE cookies (
 domain varchar(50)
> NOT NULL,
 path varchar(50) NOT NULL,
 name varchar(50) NOT NULL,
> principalid varchar(50) NOT NULL,
 host text NOT NULL,
 value text NOT
> NULL,
 secure bool NOT NULL,
 timestamp timestamp with time zone NOT NULL
> DEFAULT
CURRENT_TIMESTAMP+TIME '04:00:00',
 PRIMARY KEY
> (domain,path,name,principalid)
)

CREATE TABLE liberty (
 principalid
> varchar(50) NOT NULL,
 requestid varchar(50) NOT NULL,
 spassertionurl text
> NOT NULL,
 libertyversion varchar(50) NOT NULL,
 relaystate varchar(50) NOT
> NULL,
 PRIMARY KEY (principalid)
)

I'm developping an application that uses
> the libpqxx to execute
psql queries on the database and have to execute 500
> requests at the same time.


UPDATE cookies SET host='ping.icap-elios.com',
> value= '54E5B5491F27C0177083795F2E09162D', secure=FALSE,
>
timestamp=CURRENT_TIMESTAMP+INTERVAL '14400 SECOND' WHERE
>
domain='ping.icap-elios.com' AND path='/tfs' AND
> principalid='192.168.8.219' AND
name='jsessionid'

SELECT path, upper(name)
> AS name, value FROM cookies WHERE timestamp<CURRENT_TIMESTAMP AND
> principalid='192.168.8.219' AND
secure=FALSE AND
> (domain='ping.icap-elios.com' OR domain='.icap-elios.com')

I have to notify
> that the performance of is extremely variable and irregular.
I can also see
> that the server process uses almost 100% of
a CPU.

I'm using the default
> configuration file, and i m asking if i have to change some paramters to
> have a good performance.

Any help would be greatly appreciated.

Thanks,
> Hi,
>
> There are some results that can give you concrete  idea about my problem:
> when i 'm launching my test that executes in loop manner the  SELECT and
> UPDATE queries described above, i'm obtaining this results:
>
> UPDATE Time execution :0s: 5225 us
> SELECT Time execution  :0s: 6908 us
>
> 5 minutes Later:
>
> UPDATE Time execution :0s: 6125 us
> SELECT Time execution  :0s: 10928 us
>
> 5 minutes Later:
>
> UPDATE Time execution :0s: 5825 us
> SELECT Time execution  :0s: 14978 us
>
> As you can see , the time execution of the SELECT request is growing
> relatively to time and not the UPDATE time execution.
>  I note that to stop the explosion of the Select time execution, i m using
> frequently the vaccum query on the cookies table.
> Set  the  autovacuum parmaeter in the configuation file to on wasn't able to
> remplace the use of the vaccum command, and i don't know if this behaivour
> is normal?
>
> Thanks,
> Jamal
>
>

please execute

EXPLAIN ANALYZE <your query>
and show the results, is the only way to know what's happening

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)



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


end of thread, other threads:[~2006-01-13 17:41 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-12 00:32 Please Help: PostgreSQL performance Optimization Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
2006-01-13 17:41 ` Frank Wiles <frank@wiles.org>
2006-01-12 14:53 Re: Please Help: PostgreSQL performance Optimization Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
2006-01-12 18:42 ` Andrew Lazarus <andrew@pillette.com>
2006-01-13 09:13   ` Jamal Ghaffour <Jamal.Ghaffour@elios-informatique.fr>
2006-01-12 20:16 ` Jaime Casanova <systemguards@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