Hi list,

I'm running in a performance bottleneck in the following situation:

Database ~1.2 GB, sqlite 3.3.5, WinXP
~200 tables [phs_matrices_1 - phs_matrices_200] building the bulk of the
database. No AUTOVACUUM has been set.
Trying to drop these tables, the whole action requires ~2:45 min. The
following C++ code snippet (hopefully self-explanatory) has been used:

  db_.sql("begin");

  // Iterates over all the mentioned phs_matrices tables
  for (unsigned i=0; i!=records; ++i)
  {
    if (!db_.sql(QString("drop table phs_matrices_%1").arg(i)
    {
      db_.sql("commit");
      return false;
    } 
  }
  db_.sql("commit");

The table rows themselves have the following scheme
[primary_key, INEGER, INTEGER, INTEGER, INTEGER, REAL, REAL, REAL]

Is there a quicker way to get rid of a bunch of tables or I'm wrong
in something unseen (by me) ?

Micha
-- 

Reply via email to