Anish Enos Mathew <[EMAIL PROTECTED]>
wrote:
I want to do a vacuum on my table. Can any one tell me
whether the below statement is the valid syntax for the vacuum
command.
sqlite3_exec (db, "vacuum (data_table)", NULL, NULL, NULL);
The syntax is
VACUUM;
-- or
VACUUM table_name;
but the table name is ignored. See http://sqlite.org/lang_vacuum.html
How can we make sure that the command is really executing or not.
I don't understand this question. What makes you mistrust the engine?
Will
there be any time difference if we do the vacuum for a table?
No. The syntax allowing for a table name is for backward compatibility
only.
I tried
inserting some records with and without using the vacuum command, but
there was not much time difference between the two.
VACUUM has nothing to do with execution time. Deleting records may
result in empty pages that are kept in the database, to be reused later
for new records. Under some usage patterns, this may result in lots of
unused space in the database file. VACUUM command frees this space and
makes the file smaller.
Igor Tandetnik