issue #521 - DB speed improvements
This commit is contained in:
@@ -15,6 +15,8 @@ CREATE TABLE IF NOT EXISTS detections (
|
||||
Sens FLOAT,
|
||||
Overlap FLOAT,
|
||||
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
|
||||
chown $USER:$USER $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
|
||||
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
|
||||
restart_services.sh
|
||||
|
||||
Reference in New Issue
Block a user