Commit d7f9bbed authored by Adrian Negreanu's avatar Adrian Negreanu

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: 's avatarAdrian Negreanu <adrian.m.negreanu@intel.com>
parent c7e36ca9
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment