issue #521 - DB speed improvements
This commit is contained in:
@@ -15,6 +15,8 @@ CREATE TABLE IF NOT EXISTS detections (
|
|||||||
Sens FLOAT,
|
Sens FLOAT,
|
||||||
Overlap FLOAT,
|
Overlap FLOAT,
|
||||||
File_Name VARCHAR(100) NOT NULL);
|
File_Name VARCHAR(100) NOT NULL);
|
||||||
|
CREATE INDEX "detections_Com_Name" ON "detections" ("Com_Name");
|
||||||
|
CREATE INDEX "detections_Date_Time" ON "detections" ("Date" DESC, "Time" DESC);
|
||||||
EOF
|
EOF
|
||||||
chown $USER:$USER $HOME/BirdNET-Pi/scripts/birds.db
|
chown $USER:$USER $HOME/BirdNET-Pi/scripts/birds.db
|
||||||
chmod g+w $HOME/BirdNET-Pi/scripts/birds.db
|
chmod g+w $HOME/BirdNET-Pi/scripts/birds.db
|
||||||
|
|||||||
@@ -152,5 +152,10 @@ if ! grep SF_THRESH /etc/birdnet/birdnet.conf &>/dev/null;then
|
|||||||
fi
|
fi
|
||||||
sudo chmod +x ~/BirdNET-Pi/scripts/install_language_label_nm.sh
|
sudo chmod +x ~/BirdNET-Pi/scripts/install_language_label_nm.sh
|
||||||
|
|
||||||
|
sqlite3 $HOME/BirdNET-Pi/scripts/birds.db << EOF
|
||||||
|
CREATE INDEX IF NOT EXISTS "detections_Com_Name" ON "detections" ("Com_Name");
|
||||||
|
CREATE INDEX IF NOT EXISTS "detections_Date_Time" ON "detections" ("Date" DESC, "Time" DESC);
|
||||||
|
EOF
|
||||||
|
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
restart_services.sh
|
restart_services.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user