Thread: Performance issue

Performance issue

From
"Ricky Sutanto"
Date:
I use Apache Web Server and PostgreSQL 7.3 to collect data everyday. Now it
has been 5 month since I install that server. 

I wonder why now my web very slow to retrieve and display data? 
When I check the memory, I found that postgreSQL client seem not release
after allocate. I try to find bug on my script, but everything look clean to
me. 

Anyone have experience like me.. please share info with me

Thanks anyway, 


Ricky Sutanto




Re: Performance issue

From
Michael Fuhr
Date:
On Tue, Aug 30, 2005 at 03:42:06PM +0700, Ricky Sutanto wrote:
> I use Apache Web Server and PostgreSQL 7.3 to collect data everyday. Now it
> has been 5 month since I install that server. 

Which release of PostgreSQL 7.3?  What operating system and version?

> I wonder why now my web very slow to retrieve and display data? 

Are only web-based applications slow, or are the same queries issued
from another client (e.g., psql) also slow?  Are you running VACUUM
ANALYZE on a regular basis?  If not then you might have a lot of
dead tuples in your database.  In 7.3 you might also want to REINDEX
periodically (this isn't as necessary in later versions).  For more
information, see "Routine Database Maintenance Tasks" in the
documentation:

http://www.postgresql.org/docs/7.3/static/maintenance.html

If queries are still slow after database maintenance then please
post the EXPLAIN ANALYZE output of an example query.  Additional
info like table descriptions and sizes would also be helpful.

> When I check the memory, I found that postgreSQL client seem not release
> after allocate. I try to find bug on my script, but everything look clean to
> me. 

What client, and what do you mean by "seem not release after
allocate"?  What are you doing and how are you checking it?
What language are you using?

BTW, the pgsql-performance list would be more appropriate for
discussing performance issues.  Pgsql-sql is supposed to be for
SQL-related matters (how to write queries, etc.).

-- 
Michael Fuhr


Re: Performance issue

From
Bruno Wolff III
Date:
On Tue, Aug 30, 2005 at 15:42:06 +0700, Ricky Sutanto <ricky.sutanto@gmail.com> wrote:
> 
> I use Apache Web Server and PostgreSQL 7.3 to collect data everyday. Now it
> has been 5 month since I install that server. 
> 
> I wonder why now my web very slow to retrieve and display data? 
> When I check the memory, I found that postgreSQL client seem not release
> after allocate. I try to find bug on my script, but everything look clean to
> me. 
> 
> Anyone have experience like me.. please share info with me

You haven't given us much to go on. You might have a problem with not properly
vacuuming or analyzing or perhaps an issue with index bloat. There are also
a number of performance benefits to using more recent versions of postgres.

If you want some more specific help you should show us explain analyse
resulta for some of your slow queries.