Fossil

Check-in [d45542ccd2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Give SQLite a hint to help it run faster in symbolic_name_to_rid().
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d45542ccd2cf735ed476c051128c25a42cfe9bc0dd19e257526052708673da9f
User & Date: drh 2020-06-01 20:22:45.969
Context
2020-06-01
20:51
Optimization to markdown formatting - faster determination if a line is part of a table for the common case when it is not. check-in: bd2796b10a user: drh tags: trunk
20:22
Give SQLite a hint to help it run faster in symbolic_name_to_rid(). check-in: d45542ccd2 user: drh tags: trunk
20:12
Remove a redundant call to manifest_get(). check-in: 50ed560c6b user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/name.c.
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
    canonical16(zUuid, nXTag);
    rid = 0;
    if( zType[0]=='*' ){
      db_prepare(&q, "SELECT rid FROM blob WHERE uuid GLOB '%q*'", zUuid);
    }else{
      db_prepare(&q,
        "SELECT blob.rid"
        "  FROM blob, event"
        " WHERE blob.uuid GLOB '%q*'"
        "   AND event.objid=blob.rid"
        "   AND event.type GLOB '%q'",
        zUuid, zType
      );
    }
    if( db_step(&q)==SQLITE_ROW ){







|







378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
    canonical16(zUuid, nXTag);
    rid = 0;
    if( zType[0]=='*' ){
      db_prepare(&q, "SELECT rid FROM blob WHERE uuid GLOB '%q*'", zUuid);
    }else{
      db_prepare(&q,
        "SELECT blob.rid"
        "  FROM blob CROSS JOIN event"
        " WHERE blob.uuid GLOB '%q*'"
        "   AND event.objid=blob.rid"
        "   AND event.type GLOB '%q'",
        zUuid, zType
      );
    }
    if( db_step(&q)==SQLITE_ROW ){