Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: third_party/sqlite/src/ext/fts3/tool/fts3view.c

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 ** This program is a debugging and analysis utility that displays 2 ** This program is a debugging and analysis utility that displays
3 ** information about an FTS3 or FTS4 index. 3 ** information about an FTS3 or FTS4 index.
4 ** 4 **
5 ** Link this program against the SQLite3 amalgamation with the 5 ** Link this program against the SQLite3 amalgamation with the
6 ** SQLITE_ENABLE_FTS4 compile-time option. Then run it as: 6 ** SQLITE_ENABLE_FTS4 compile-time option. Then run it as:
7 ** 7 **
8 ** fts3view DATABASE 8 ** fts3view DATABASE
9 ** 9 **
10 ** to get a list of all FTS3/4 tables in DATABASE, or do 10 ** to get a list of all FTS3/4 tables in DATABASE, or do
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 " count(distinct idx)" 391 " count(distinct idx)"
392 " FROM (SELECT length(a.block) AS len, idx" 392 " FROM (SELECT length(a.block) AS len, idx"
393 " FROM '%q_segments' a JOIN '%q_segdir' b" 393 " FROM '%q_segments' a JOIN '%q_segdir' b"
394 " WHERE (a.blockid BETWEEN b.start_block" 394 " WHERE (a.blockid BETWEEN b.start_block"
395 " AND b.leaves_end_block)" 395 " AND b.leaves_end_block)"
396 " AND (b.level%%1024)==%d)", 396 " AND (b.level%%1024)==%d)",
397 pgsz-45, zTab, zTab, i); 397 pgsz-45, zTab, zTab, i);
398 if( sqlite3_step(pStmt)==SQLITE_ROW 398 if( sqlite3_step(pStmt)==SQLITE_ROW
399 && (nLeaf = sqlite3_column_int(pStmt, 0))>0 399 && (nLeaf = sqlite3_column_int(pStmt, 0))>0
400 ){ 400 ){
401 sqlite3_int64 sz;
401 nIdx = sqlite3_column_int(pStmt, 5); 402 nIdx = sqlite3_column_int(pStmt, 5);
402 sqlite3_int64 sz;
403 printf("For level %d:\n", i); 403 printf("For level %d:\n", i);
404 printf(" Number of indexes...................... %9d\n", nIdx); 404 printf(" Number of indexes...................... %9d\n", nIdx);
405 printf(" Number of leaf segments................ %9d\n", nLeaf); 405 printf(" Number of leaf segments................ %9d\n", nLeaf);
406 if( nIdx>1 ){ 406 if( nIdx>1 ){
407 printf(" Average leaf segments per index........ %11.1f\n", 407 printf(" Average leaf segments per index........ %11.1f\n",
408 (double)nLeaf/(double)nIdx); 408 (double)nLeaf/(double)nIdx);
409 } 409 }
410 printf(" Total size of all leaf segments........ %9lld\n", 410 printf(" Total size of all leaf segments........ %9lld\n",
411 (sz = sqlite3_column_int64(pStmt, 1))); 411 (sz = sqlite3_column_int64(pStmt, 1)));
412 printf(" Average size of leaf segments.......... %11.1f\n", 412 printf(" Average size of leaf segments.......... %11.1f\n",
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 showSegmentStats(db, zTab); 866 showSegmentStats(db, zTab);
867 }else if( strcmp(zCmd,"stat")==0 ){ 867 }else if( strcmp(zCmd,"stat")==0 ){
868 showStat(db, zTab); 868 showStat(db, zTab);
869 }else if( strcmp(zCmd,"vocabulary")==0 ){ 869 }else if( strcmp(zCmd,"vocabulary")==0 ){
870 showVocabulary(db, zTab); 870 showVocabulary(db, zTab);
871 }else{ 871 }else{
872 usage(argv[0]); 872 usage(argv[0]);
873 } 873 }
874 return 0; 874 return 0;
875 } 875 }
OLDNEW
« no previous file with comments | « third_party/sqlite/src/ext/fts3/fts3_write.c ('k') | third_party/sqlite/src/ext/fts3/unicode/mkunicode.tcl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698