Subject Re: [ib-support] Re: FB slow
Author Helen Borrie
At 11:00 PM 13-07-02 +0300, you wrote:

> > What tool are you using to run your SQL commands?
>
>IBExpert 2.0.0.5 Personal Edition, but I tried IBConsole with the same
>result.
>
>repeating the same update sql in the same transaction takes a lot of time...

I don't want to waste a lot of time in conjecturing this, since it's not
something that would (should) be done to production data and wouldn't be a
requirement for any transaction-capable DBMS. Why is it an important test
for you?

>Very odd...
>It's not going to access old generation of records, since the transaction
>has the same number, so it should access the modified records. It should be
>faster, since some records should be cached now, due first update. Besides
>that, the second update doesn't really change anything. The field was
>changed the first time, the second time is set to the same value :-(

How would the engine know that? It still has to locate each delta record
by walking both the cache and the original versions. On your first pass,
it attacks the data in natural order; on subsequent passes it has to
compare two sets of data, each with its own natural order. When a query is
slow, the time cost is a matter of navigation, not the time it takes to
alter data.

fwiw, in your contemplations of the navel, it might be interesting to see
whether indexing "table_name" makes any difference.

heLen

All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________