Hi! I wonder - what could possibly cause a great variance in speeds of this statement?
INSERT INTO backuptable ( backup_key, original_key, original_value1, ..., original_valuen ) SELECT GEN_ID(backupgen,1), source_key, source_value1, ..., source_valuen FROM sourcetable WHERE 1=1 -- all records The statement takes anything between minutes and hours (in different databases, the same database usually takes approximately the same time), and I just can't figure out what could cause this variance. The SELECT itself is quite fast (seconds), traversing its resultset as well (tens of seconds). Source_value* is either a DOUBLE PRECISION or an INTEGER. The backuptable only has three indices including the primary key (the other two cover INTEGERs). The size of the sourcetable is approximately 600K records, the size of backuptable approximately 26M records. The Firebird version (1.5, 2.1, 2.5) doesn't seem to have a significant effect on this). Thanks, 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: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/