Subject | Re: Slow query in Firebird/Interbase |
---|---|
Author | bortoswatkins |
Post date | 2004-01-23T03:38:52Z |
--- In firebird-support@yahoogroups.com, "bortoswatkins" <rob@b...>
wrote:
avail.
And to top it off, I imported the table into MS Access, and the query
runs in half the time.
I really must be missing something.
wrote:
> --- In firebird-support@yahoogroups.com, "Alan McDonald"<alan@m...>
> wrote:server
> > > If I have a table in firebird, and a table in microsoft SQL
> > > 2000. Identical table setup( I actually used DTS to import theseconds.
> table
> > > into SQL server).
> > >
> > > In MS SQL server I can run a query and return all rows in 6
> seconds.
> > >
> > > Using firebird(I have tried 1.03 and 1.5, as well as interbase
> 7.1)
> > > it takes 23 seconds.
> > >
> > > I have typed the query and
> > >
> > > This query computes a running total for all records.
> > >
> > > If I run the index tuning wizard in MS SQL server, it puts a
> clusted
> > > index on Company_id. Then the query returns all rows in 4
> > >ibconsole,
> > > I have an index on the same field in Firebird.
> > >
> > > I have ran the query from within my Delphi app, and in
> > > ibexpert, and even from Easysoft ODBC. Same results.I have tried everything that was suggested in previous posts to no
> > >
> > > What am I missing?????
> > >
> > > Thanks,
> >
> > Oh - and show us the PLAN which results from the query when you
> fire it in
> > IBExpert.
> > Alan
> Here is the plan:
>
> PLAN (B INDEX (LEDGER_IDX1))
> PLAN SORT ((A INDEX (LEDGER_IDX1)))
>
>
> the index (LEDGER_IDX1 ) is on COMPANY_ID only...
avail.
And to top it off, I imported the table into MS Access, and the query
runs in half the time.
I really must be missing something.