-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds indexes to the netblock table (#2780)
Netblock is really big, so adding some indexes to the decimal IP fields (used to do the actual locating) to speed things up.
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Generated by Django 3.2.21 on 2023-10-02 14:37 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("maxmind", "0001_add_geoname_and_netblock_tables"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddIndex( | ||
model_name="netblock", | ||
index=models.Index( | ||
fields=["decimal_ip_start"], name="maxmind_net_decimal_dfdb1a_idx" | ||
), | ||
), | ||
migrations.AddIndex( | ||
model_name="netblock", | ||
index=models.Index( | ||
fields=["decimal_ip_end"], name="maxmind_net_decimal_6166c4_idx" | ||
), | ||
), | ||
migrations.AddIndex( | ||
model_name="netblock", | ||
index=models.Index( | ||
fields=["decimal_ip_start", "decimal_ip_end"], | ||
name="maxmind_net_decimal_ab7249_idx", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters