Trainor, Chris <chris.trai...@ironmountain.com> wrote: > I am trying to use the Sum function on a column in a table with ~450K > rows in it. > > Select sum(Col4) from Table1 > > It takes over 2 minutes to execute when using the original table. I > created an exact copy of the table with the same indices and > constraints and inserted all the data from the original table into > it. Summing that column on the copied table only takes a few seconds.
Try running VACUUM on your database. Your original table is probably badly fragmented and results in excessive disk seeking. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users