Subject | Re: [firebird-support] Great variance in speed of an INSERT INTO ... SELECT |
---|---|
Author | Josef Kokeš |
Post date | 2011-10-20T05:14:36Z |
Hi Ann,
rows, so no index should come into play.
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
> The WHERE 1 = 1 is unnecessary, but doen't do any harm. There maybeI know. But I wanted to emphasise that there are no limitations on the
> databases that require a WHERE clause, but Firebird doesn't. But that's not
> the problem.
rows, so no index should come into play.
> The normal cause of wild variations in the performance of queries is garbageGarbage collection doesn't seem to play any significant part. I even
> 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).
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