Table has different rootpage in EXPLAIN and sqlite_master

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Table has different rootpage in EXPLAIN and sqlite_master

curmudgeon
Differing by 1. I noticed this today for 1 table only but not always - sometimes they were equal. I’ve been unable to reproduce it after a vacuum. Does this indicate a corrupt db or is it a case of it can happen for some reason I’ve missed?
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Table has different rootpage in EXPLAIN and sqlite_master

David Raymond
They shouldn't be different, no. Do you have a copy of the weird version of the database still, or have a copy of the explain text and the sqlite_master contents? Was there another index or table whose root page is what was listed in the explain output? For example, were you expecting it to use the table, but it used a covering index instead?


-----Original Message-----
From: sqlite-users <[hidden email]> On Behalf Of x
Sent: Monday, February 3, 2020 1:07 PM
To: Discussion of SQLite Database <[hidden email]>
Subject: [sqlite] Table has different rootpage in EXPLAIN and sqlite_master

Differing by 1. I noticed this today for 1 table only but not always - sometimes they were equal. I’ve been unable to reproduce it after a vacuum. Does this indicate a corrupt db or is it a case of it can happen for some reason I’ve missed?
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Table has different rootpage in EXPLAIN and sqlite_master

curmudgeon
Hi David,

The two queries were as follows

explain select vCol,* from Race,Meta.vCols;
and
select * from meta.sqlite_master where type='table';

Sorry, I don’t have a copy of the unvacuumed db.


________________________________
From: sqlite-users <[hidden email]> on behalf of David Raymond <[hidden email]>
Sent: Monday, February 3, 2020 6:19:31 PM
To: SQLite mailing list <[hidden email]>
Subject: Re: [sqlite] Table has different rootpage in EXPLAIN and sqlite_master

They shouldn't be different, no. Do you have a copy of the weird version of the database still, or have a copy of the explain text and the sqlite_master contents? Was there another index or table whose root page is what was listed in the explain output? For example, were you expecting it to use the table, but it used a covering index instead?


-----Original Message-----
From: sqlite-users <[hidden email]> On Behalf Of x
Sent: Monday, February 3, 2020 1:07 PM
To: Discussion of SQLite Database <[hidden email]>
Subject: [sqlite] Table has different rootpage in EXPLAIN and sqlite_master

Differing by 1. I noticed this today for 1 table only but not always - sometimes they were equal. I’ve been unable to reproduce it after a vacuum. Does this indicate a corrupt db or is it a case of it can happen for some reason I’ve missed?
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Table has different rootpage in EXPLAIN and sqlite_master

curmudgeon
In reply to this post by David Raymond
You were correct David. The explain rootpage referred to an index and I was
checking against the table rootpage.



--
Sent from: http://sqlite.1065341.n5.nabble.com/
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users