mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-03-03 15:28:28 +00:00
Improve gravity on systems with low memory (#5977)
This commit is contained in:
commit
53e241f057
1 changed files with 2 additions and 1 deletions
|
@ -92,7 +92,8 @@ gravity_build_tree() {
|
|||
echo -ne " ${INFO} ${str}..."
|
||||
|
||||
# The index is intentionally not UNIQUE as poor quality adlists may contain domains more than once
|
||||
output=$({ pihole-FTL sqlite3 -ni "${gravityTEMPfile}" "CREATE INDEX idx_gravity ON gravity (domain, adlist_id);"; } 2>&1)
|
||||
# We use temp_store = FILE to avoid memory exhaustion on large databases
|
||||
output=$({ pihole-FTL sqlite3 -ni "${gravityTEMPfile}" "PRAGMA temp_store = FILE; CREATE INDEX idx_gravity ON gravity (domain, adlist_id);"; } 2>&1)
|
||||
status="$?"
|
||||
|
||||
if [[ "${status}" -ne 0 ]]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue