Browse files

sqlite3: speedup the SELECTs

The uniqueness of rows is maintained by first doing a select.
In case the item is not found, it's INSERTed.

This is done for files, refids, params and includes, data
that is not unique by itself, like cross-references for example.
In other words, you can have many memberdefs in one file,
but you can only have one cross-reference between two functions
since the reference location is unique.

So, when SELECTing files and refids, use the file name and refids
as primary key since that's the fastest way to do it.

Also 'OR REPLACE' not necessary in 'INSERT OR REPLACE'.

Signed-off-by: Adrian Negreanu <>
  • Loading branch information...
groleo committed Feb 27, 2014
1 parent c7e36ca commit d7f9bbedaa4b4fcc0253470d522149a2307d1020
Showing with 258 additions and 185 deletions.
  1. +258 −185 src/sqlite3gen.cpp
Oops, something went wrong.

0 comments on commit d7f9bbe

Please sign in to comment.