Subject Re: Slow performance with Index
Author Adam
Hi Ed,

Are you executing the query from the database server or over a
network connection? From what I can gather, your recordset to be
returned will have somewhere around 7 million records (assuming a 50-
50 split). The selectivity of that index will be very large. What
sort of performance are you expecting from this query, and what sort
of hardware are you running your database over? Obviously high speed
SCSI hard drives and a lot of RAM on a server that does nothing else
will help out.

My guess is your Prepare and Execution times will be quite reasonable
(ms) and you are waiting on Fetch time which is really hardware and
configuration dependent. I just ran a query to select 15000 records
(1 integer field) which took 1 second, which if linearly projected to
7 million records will take around 8 minutes (and that is locally).

Adam


--- In firebird-support@yahoogroups.com, "Edwin A. Epstein, III"
<eepstein@c...> wrote:
> I have a table with 14 million records in it. As part of certain
operations
> I need to do against the records I flag them individually as part
of a que.
> I am using a field called DNC_QUED which is a VarChar(1) and ASCII
character
> set. I have non-unique index on just the field alone. There are
no null
> values and the only values are '1' or '0'.
>
> When I pull a SELECT FIELD1 FROM TABLE1 WHERE DNC_QUED = '1' and
attempt to
> fetch all records it takes a very long time (30 minutes plus). I
checked
> the plan and it is using the index.
>
> Is there anything I can do to increase the performance of that
select
> statement?
>
> Thanks, Ed