Subject Re: [IBO] Problem using locate
Author Svein Erling Tysvær
Sorry John, I don't believe you.

SELECT * FROM XXXXXXXX
WHERE OWNERNAME = 'RANKLEY'
ORDER BY OWNERNAME

cannot possibly take minutes to return a handful of records if
OWNERNAME is indexed. Well, maybe it is possible, but then there are
other problems that causes this (e.g. Windows XP doing a file copy of
.gdb files before allowing anyone to access them or there being
thousands of fields to transfer and you connecting through the
Internet), not the select itself.

Firebird is generally fast, and - if treated correctly - a lot better
than Paradox to handle large tables. I would expect the above query to
execute in less than a second, not two seconds.

So, what is it that you're not telling us? Is the above SQL the exact
query you're executing or are there other parts you've not told us
about. What's the reported plan (you can find this by e.g. typing it
into IB_SQL and prepare the statement) and your table/index definitions?

HTH,
Set

--- In IBObjects@yahoogroups.com, "John Costanzo" wrote:
>
> Hello:
>
> I meant to say OWNERNAME. Ownername is the field that is indexed
> and the query selects ownername = xxxxx.
>
> > I then wrote a IBO test application. One databound grid, 1
> > IBOQuery, 1 button. The SQL for the query is
> > SELECT * FROM XXXXXXXX
> > WHERE OWNERNAME = RANKLEY
> > ORDER ON OWNERNAME (Ownwername is a defined index).
> > The Grid is linked to the query. The button code simply says
> > query1.active := true. When I click the button the IBO cursor
> > is displayed and the program goes to never never land for almost
> > 2 minutes before the grid is displayed. Unless I am doing
> > something real wrong, this would mean that every time the user
> > selected a name from the top grid there would be a lag of at
> > least 2 minutes (I say at least because I selected Rankley
> > because he only had a dozen or so records). What would happen
> > if I selected SMITH?