Hello Joanne,

Regarding:  "Is there any command to check if the index or database in good 
condition."

That's why I listed the pragma below in my email of last night and repeat email 
earlier.

You're in luck if only the index is corrupted of course.

SAVE a copy of your current database (very important).

Try dropping the index and rebuilding it.
Even if ok at that point, you might want to then run a VACUUM.

==================

Joanne,

I couldn't say, but if I were you I'd probably

-- Hold tight to my backups of my data.
-- Run "PRAGMA integrity_check;" as soon as possible.
-- See if the problem can be reproduced using the command-line utility.
-- Is there an index defined on peerid?   Does "Explain query plan" show that 
it is used by the first query.  If so, perhaps the peerid index contains some 
corruption?
-- Does adding "peerid" to your second select run without error?

Regards,
  Donald
       

-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Joanne Pham
Sent: Tuesday, May 05, 2009 4:02 PM
To: General Discussion of SQLite Database
Subject: [sqlite] How to check the healthy of database and the indexes ofthe 
tables

Hi All,
I had the database and one of the index is not good condition. Every time I use 
the index by select ... group by .. the result only return few rows and the 
message print  out that "database disk image is malformed". Is there any 
command to check if the index or database in good condition.
Thanks,
JP


      
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to