Subject Optimisation Query
Author Maya Opperman
Hi,



I am trying to speed up a refresh query, and have stripped away
everything but the straight "select fields from table where id = :id",
but that alone it still taking 0.8 seconds to complete.



The results from IBExpert are as follows:



Plan

PLAN (C INDEX (RDB$PRIMARY6))



Adapted Plan

PLAN (C INDEX (PK_CUSTOMERS))



------ Performance info ------

Prepare time = 16ms

Execute time = 875ms

Avg fetch time = 875.00 ms

Current memory = 17,947,188

Max memory = 24,463,068

Memory buffers = 2,048

Reads from disk to cache = 0

Writes from cache to disk = 0

Fetches from cache = 6 (Can I reduce this?)



Are there any changes I can make to the database settings, which will
reduce that time, or is 0.8 as good as I can expect?



(There are currently 18 000 records in the table, Firebird 2.1.3, and
there are a couple of large varchars. One varchar(1000) and another
varchar(300), which I should probably try convert to blobs..?)



Thanks in advance!



Maya







[Non-text portions of this message have been removed]