pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@boutiquenumerique.com>
To: SpaceBallOne <space_ball_one@hotmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: poor performance of db?
Date: Wed, 26 Jan 2005 21:02:42 +0100
Message-ID: <opsk77as1gth1vuj@musicbox> (raw)
In-Reply-To: <BAY14-DAV850511937A7C1DDE0806FCC850@phx.gbl>
References: <BAY14-DAV850511937A7C1DDE0806FCC850@phx.gbl>



> Every time I tested an idea to speed it up, I got exactly the same  
> loading time on a Athlon 1800+, 256Mb RAM, 20Gb PATA computer as  
> compared to a Dual Opteron 246, 1Gb RAM, 70Gb WD Raptor SATA server.  
> Now, why a dual opteron machine can't perform any faster than a lowly  
> 1800+ athlon in numerous tests is completely beyond me ... increased  
> memory and RAID 0 disc configurations so far have not resulted in any  
> significant performance gain in the opteron server.

	How many rows does the query return ?

	Maybe a lot of time is spent, hidden in the PHP libraries, converting the  
rows returned by psql into PHP objects.

	You should try that :

	EXPLAIN ANALYZE SELECT your query
	-> time is T1

	CREATE TABLE cache AS SELECT your query
	EXPLAIN ANALYZE SELECT * FROM cache
	-> time is T2 (probably very small)

	Now in your PHP script replace SELECT your query by SELECT * FROM cache.  
How much does the final page time changes ? This will tell you the time  
spend in the postgres engine, not in data transmission and PHPing. It will  
tell wat you can gain optimizing the query.



view thread (8+ messages)

Message-ID: <opsk77as1gth1vuj@musicbox>
Permalink:  ../opsk77as1gth1vuj@musicbox/
Also on:    postgresql.org/message-id/opsk77as1gth1vuj@musicbox

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: lists@boutiquenumerique.com, space_ball_one@hotmail.com
  Subject: Re: poor performance of db?
  In-Reply-To: <opsk77as1gth1vuj@musicbox>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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