When I compare the database bytes before and after the 2nd 
process VACUUM these bytes differ:

zero-based    value     value
byte offset   before    after     my guess of what it is
              2nd VAC   2nd VAC
-----------   -------   -------   ----------------------
27            2         5         File change counter?
43            2         5         Schema cookie?
47            4         1         meta[1], file format?

Doesn't byte offset 47 correspond to meta[1], the file format 
of the schema layer?

--- Joe Wilson <[EMAIL PROTECTED]> wrote:
> Regarding http://www.sqlite.org/cvstrac/tktview?tn=2804 ...
> 
> I'm confused by the explanation.
> Ignoring the PRAGMA for the moment, I was surprised that DESC 
> indexes were not available after a reconnect and VACUUM, as shown
> in the example:
> 
> $ rm -f foo.db
> $ ./sqlite3-3.5.3.bin foo.db
> SQLite version 3.5.3
> Enter ".help" for instructions
> sqlite> PRAGMA legacy_file_format=OFF;
> sqlite> CREATE TABLE abc(a,b,c);
> sqlite> CREATE INDEX abc_i on abc(b desc, c asc, a desc);
> sqlite> explain query plan select * from abc order by b desc, c asc, a desc;
> 0|0|TABLE abc WITH INDEX abc_i ORDER BY
> sqlite> vacuum;
> sqlite> explain query plan select * from abc order by b desc, c asc, a desc;
> 0|0|TABLE abc WITH INDEX abc_i ORDER BY
> sqlite> .q
> 
> $ ./sqlite3-3.5.3.bin foo.db
> SQLite version 3.5.3
> Enter ".help" for instructions
> sqlite> explain query plan select * from abc order by b desc, c asc, a desc;
> 0|0|TABLE abc WITH INDEX abc_i ORDER BY
> sqlite> vacuum;
> sqlite> explain query plan select * from abc order by b desc, c asc, a desc;
> 0|0|TABLE abc
> 
> Notice that the DESC index is no longer available after the second
> process' VACUUM was run.
> 
> If this isn't the file format being changed, then why isn't the DESC
> index being used?
> 
> Is this by design?




      
____________________________________________________________________________________
Be a better pen pal. 
Text or chat with friends inside Yahoo! Mail. See how.  
http://overview.mail.yahoo.com/

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to