SQLite Forum

Runtime of and opcode counts of ANALYZE
Login
Yes, you are correct.

I did the tests with sqlite3 for both databases and also used sqlite3_analyzer.
I'm not sure which info is really relevant, so:

For PRAGMA integrity_check(100);

Database A:
```Virtual Machine Steps:               583825680
Run Time: real 425.265 user 69.515625 sys 78.218750```

Database B:
```Virtual Machine Steps:               -1358706478 <=========== ?
Run Time: real 716.021 user 352.218750 sys 132.031250```

For ANALYZE;

Database A:
```Virtual Machine Steps:               865130611
Run Time: real 75.830 user 6.234375 sys 12.093750```

Database B:
```Virtual Machine Steps:               327623562
Run Time: real 44.232 user 39.859375 sys 4.312500```

sqlite3_analyzer:

**NOTE:** Two large tables were removed from the problem database B to make it *transferable*. It has over 50 GB in its original state.

Database A:
```Page size in bytes................................ 1024      
Pages in the whole file (measured)................ 20739558  
Pages in the whole file (calculated).............. 20739557  
Pages that store data............................. 20739557   100.000% 
Pages on the freelist (per header)................ 0            0.0% 
Pages on the freelist (calculated)................ 1            0.0% 
Pages of auto-vacuum overhead..................... 0            0.0% 
Number of tables in the database.................. 67        
Number of indices................................. 65        
Number of defined indices......................... 64        
Number of implied indices......................... 1         
Size of the file in bytes......................... 21237307392
Bytes of user payload stored...................... 18278789695  86.1% 
```
Database B:
```Page size in bytes................................ 4096      
Pages in the whole file (measured)................ 4285025   
Pages in the whole file (calculated).............. 4285024   
Pages that store data............................. 4284283     99.983% 
Pages on the freelist (per header)................ 741          0.017% 
Pages on the freelist (calculated)................ 742          0.017% 
Pages of auto-vacuum overhead..................... 0            0.0% 
Number of tables in the database.................. 62        
Number of indices................................. 63        
Number of defined indices......................... 62        
Number of implied indices......................... 1         
Size of the file in bytes......................... 17551462400
Bytes of user payload stored...................... 8154369696  46.5%
```