pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Query is significantly slower on faster machine
2+ messages / 2 participants
[nested] [flat]

* Query is significantly slower on faster machine
@ 2004-08-12 02:11  Andy Lowe <andyl@dmetrix.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Andy Lowe @ 2004-08-12 02:11 UTC (permalink / raw)
  To: pgsql-odbc

Hello-

I've got an application that runs on the same machine as my database.  The
application contains a query that was taking significantly too long to run
on a test system.  On my development machine, it runs approximately 8-10
times faster, using a database containing identical data.  When I first
started looking at the issue, I wondered if different versions of PostgreSQL
were running.  Both machines are running the 7.3.2.0 version of the ODBC
driver.  But, my development machine is running 7.4-1 and the test machine
was running 7.4.1-3.  I experimented with different versions to see if that
made a difference.  It didn't.  I went so far as to copy my whole cygwin
directory from my development machine to the test machine, just to make sure
everything was exactly the same, and the test machine was still taking
longer to run the query.  I tried having the application running on the test
machine connect to the database on my development machine.  Again, it was
very slow.

Both are runing Win2K SP4.  The development machine is a 2Ghz Athlon with
768MB RAM, and the test machine has dual 2.8Ghz Xeons with 2Gig RAM, so it's
not like the test machine is slower.

Since I've made sure that the database software was identical (assuming
doing a directory copy results in identical software, which seems
reasonable), I doubt that there is any kind of configuration difference
between the databases on the two machines.  Since connecting to my
development database from the test machine results in a slow query, that
points to a problem with the test machine.  I have the DSNs set up exactly
the same on both machines, so that's not an issue.  But, both systems are
running the same version of the ODBC driver, so that shouldn't be a problem
either.  My best guess is that there is something wrong with the ODBC
connection on the test machine, since that is what is slow, regardless of
what database it is connecting to.  However, since the drivers on both
machines are identical (yes, I have reinstalled them), I don't see how
that's possible.

So, given two seemingly identical configurations, a faster machine takes
longer to run a query than a slow machine.  Anyone have any explanations for
that or ideas for other things to try?

Thanks in advance,
Andy Lowe
DMetrix Software Engineer
andyl@dmetrix.com

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

* Re: Query is significantly slower on faster machine
@ 2004-08-13 18:16  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Andy Lowe <andyl@dmetrix.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2004-08-13 18:16 UTC (permalink / raw)
  To: Andy Lowe <andyl@dmetrix.com>; +Cc: pgsql-odbc

"Andy Lowe" <andyl@dmetrix.com> writes:
> I've got an application that runs on the same machine as my database.  The
> application contains a query that was taking significantly too long to run
> on a test system.  On my development machine, it runs approximately 8-10
> times faster, using a database containing identical data.

My first instinct is to think that you're getting different plans for
the query.  Try EXPLAIN ANALYZE'ing the query on both systems and see
what you get.

			regards, tom lane



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


end of thread, other threads:[~2004-08-13 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-12 02:11 Query is significantly slower on faster machine Andy Lowe <andyl@dmetrix.com>
2004-08-13 18:16 ` Tom Lane <tgl@sss.pgh.pa.us>

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