On Mar 11, 2010, at 11:13 AM, Skand wrote: > > Hi Folks, > > Whats going on here? I would expect the following delete to delete > everything under 9999999999. > > sqlite> .schema > > CREATE TABLE ip_domain_table (ip_domain TEXT, answer TEXT, ttl > INTEGER, > PRIMARY KEY(ip_domain, answer, ttl)); > > sqlite> select count(*) from ip_domain_table where ttl < 9999999999 ; > > 1605343
What does "PRAGMA integrity_check" show you at this point? > > sqlite> pragma cache_size=100000; delete from ip_domain_table where > ttl < > 9999999999; > > sqlite> select count(*) from ip_domain_table where ttl < 9999999999 ; > > 258 > > sqlite> select * from ip_domain_table where ttl < 9999999999 limit 1; > 107.35.138.41|127.2.0.2|1266895619 > > The first "select" shows that there are 1605343 entries which have > ttl below > 9999999999. So after the following delete, shouldn't the number of > entries > go down to 0? If the TTL corresponding to these entries were > something else, > why should they be counted for in the select in the first place? The > delta > of entries between the two selects should be 0. > > Do I have some fundamental misunderstanding about how sqlite stores > values > in database? > > > > -- > View this message in context: > http://old.nabble.com/sqlite3-delete-does-not-delete-everything--tp27865654p27865654.html > Sent from the SQLite mailing list archive at Nabble.com. > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users D. Richard Hipp d...@hwaci.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users