Subject Re: Query with Paradox much faster than Interbase
Author Aage Johansen
rod wrote:
-------------------------------
We have converted an app from paradox to interbase.
So the tables are the same, the indexes are the same, even the data
is the same dataset - just datapumped from paradox to interbase.

Using TUTI on the paradox db, the query

SELECT sum(routing.subtotal) as SumAgentTotal
FROM hub, waybill, routing, agent
WHERE costcntr = 2
and routing.agent = agent.agent
and agent.ownresource = FALSE
and waybill.orighub = hub.hub
and waybill.waybill = routing.waybill
and invdate >= '08/01/2001'
and invdate <= '08/31/2001'

takes 3 seconds

Using IBConsole on the interbase db the same query (on the same PC)
takes 50 seconds - the only diff in the query using 0 instead of FALSE

Using D5 - IB6.
-------------------------------

As Helen wrote, C/S dbs are very different from desktop databases (like
Paradox), and there are some situations where it is very hard to beat
Paradox. In most situations, however, esp. in multi user settings, the C/S
dbs rule. But, you will have to use the db as a C/S db (not as you would a
desktop db).

When asking for help in dissecting a problem, do mention which OS you use,
any interesting h/w (like multi-procs), the (interesting parts of the)
table structures, primary keys, indexes, and the PLAN (which you can show
with IBconsole, I think - at least you can with IB_SQL). You do mention
IB6 and IBconsole so we know IBX is used, otherwise you should mention
which middeware you are using (IBX, dbExpress, ODBC, BDE, IBO, FIBplus, ...).

Now, post the plan for your query (and the other info). Try to rewrite the
query to use the newer join syntax (replacing most of the current where
clause).


Regards,
Aage J.