Yeah ok that makes more sense. 

Sorry, that was a bit obvious - late night.

Thanks!
- Deon

-----Original Message-----
From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> On Behalf Of 
Richard Hipp
Sent: Wednesday, August 7, 2019 11:32 AM
To: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
Subject: Re: [sqlite] Is rootPage a reasonable estimate for index age?

On 8/7/19, Deon Brewis <de...@outlook.com> wrote:
> If I have 2 indexes 'A' and 'B', can I use rootPage to determine which 
> one of them is older?
>
> This seems to work for me, or is it just because my database has been 
> vacuumed recently and if a database has a lot of empty pages it will 
> add new indexes to smaller pages than older indexes?

It probably only works because your DB is vacuumed.

Seems to me that the rowid of the sqlite_master table entry for your index 
would be a more reliable indicator.  Larger rowids are newer.

--
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to