This DB is mostly used to retrieve all the street names for a given city. Adding an index for the full_insee field greatly improves the query time. Without the index: time $(echo 'select * from fantoir where full_insee="65054";' | sqlite3 fantoir.sqlite) real 0m2,230s user 0m1,896s sys 0m0,337s With the index: time $(echo 'select * from fantoir where full_insee=65054;' | sqlite3 fantoir.sqlite) real 0m0,148s user 0m0,126s sys 0m0,024s |
||
---|---|---|
scripts | ||
src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
README.md | ||
shell.nix |
README.md
Fast Fantoir
time ./scripts/gen-fantoir.sh FANTOIR0721
Generating fantoir CSV
Finished release [optimized] target(s) in 0.00s
Running `target/release/fast-fantoir FANTOIR0721`
Generating fantoir SQLite DB
DB generated at /home/ninjatrappeur/code-root/git.alternativebit.fr/fast-fantoir/fantoir.sqlite
real 0m13,319s
user 0m9,804s
sys 0m3,458s
DB Schema:
sqlite> .tables
fantoir
sqlite> .schema fantoir
CREATE TABLE IF NOT EXISTS "fantoir"(
"full_insee" TEXT,
"rivoli_with_key" TEXT,
"libelle" TEXT
);