Go to file
Félix Baylac-Jacqué 6787e782da Add an index on the full_insee field
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
2022-02-17 22:18:23 +01:00
scripts Add an index on the full_insee field 2022-02-17 22:18:23 +01:00
src Adding street transcodification 2022-02-17 22:18:13 +01:00
.gitignore Reference read 2021-11-03 21:27:07 +01:00
Cargo.lock CSV intermediate file approach. 2021-11-17 21:32:02 +01:00
Cargo.toml CSV intermediate file approach. 2021-11-17 21:32:02 +01:00
README.md Please read me 2021-11-17 21:44:20 +01:00
shell.nix Naive SQLite implementation 2021-11-17 20:45:16 +01:00

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
);