Subject | Query Optimisation problems on different platforms |
---|---|
Author | phil_hhn |
Post date | 2006-02-16T06:45:13Z |
Hi,
We got to the bottom of a very slow query running on Mac OSX (Firebird
1.5.1). We moved a couple of things around in the query (logically the
same query) and a 20second wait reduced to practically nothing.
Unfortunately this has ruined the performance for the same query when
running on Windows.
It seems therefore there are significant differences in query
optimisation on the two platforms (we would have assumed the optimiser
would be the same on both!).
In practice we have a Java application, connecting to a database via
JDBC; the database may be on either a Mac or Windows. For now it seems
we have to send different queries depending on the database platform
because of the way they perform.
Is there a way to ask the JDBC driver what platform the database is
on? Or give the optimiser some hints as to how it should run the
query? The latter would be ok, except that we sometimes connect to MS
SQL Server databases, so we want 'plain-vanilla' queries where possible...
Thanks in advance
We got to the bottom of a very slow query running on Mac OSX (Firebird
1.5.1). We moved a couple of things around in the query (logically the
same query) and a 20second wait reduced to practically nothing.
Unfortunately this has ruined the performance for the same query when
running on Windows.
It seems therefore there are significant differences in query
optimisation on the two platforms (we would have assumed the optimiser
would be the same on both!).
In practice we have a Java application, connecting to a database via
JDBC; the database may be on either a Mac or Windows. For now it seems
we have to send different queries depending on the database platform
because of the way they perform.
Is there a way to ask the JDBC driver what platform the database is
on? Or give the optimiser some hints as to how it should run the
query? The latter would be ok, except that we sometimes connect to MS
SQL Server databases, so we want 'plain-vanilla' queries where possible...
Thanks in advance