Hi Ann,

> The WHERE 1 = 1 is unnecessary, but doen't do any harm. There maybe
> databases that require a WHERE clause, but Firebird doesn't. But that's not
> the problem.

I know. But I wanted to emphasise that there are no limitations on the 
rows, so no index should come into play.

> The normal cause of wild variations in the performance of queries is garbage
> collection. For example, if you did this query twice, deleting all rows in
> backuptable, then resetting the generator backupgen to 1, the second run
> would have to remove all the old rows and deleted stubs and clean up the
> indexes (assuming that source_key is actually a unique key).

Garbage collection doesn't seem to play any significant part. I even 
deleted the whole backup table, performed the backup/restore cycle, and 
still got long times. What *did* help was limiting the SELECT from 
sourcetable to "significant records", some 6000 of them (a reduction of 
two orders of magnitude). But it still seems strange that Firebird would 
choke on INSERTs, even in what I perceive to be the ideal condictions to 
the server.

Pepak


------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to