• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cfpb / django-hud
76%
master: 76%

Build:
Build:
LAST BUILD BRANCH: add-index-together
DEFAULT BRANCH: master
Repo Added 21 Mar 2017 04:08PM UTC
Files 19
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH add-index-together
branch: add-index-together
CHANGE BRANCH
x
Reset
  • add-index-together

pending completion
14

push

travis-ci

chosak
add additional index to CachedGeoData

@marcesher made the observation that queries against cached geodata
could potentially be optimized through use of an additional index. When
the cached geodata is queried in `hud_api_replace.geocode`, it's looked
up using Python code like

```py
CachedGeodata.objects.filter(expires__gte=time.time()).get(key=address)
```

In practice this results in SQL like

```sql
SELECT * FROM hud_api_replace_cachedgeodata
WHERE expires >= %s AND key = %s
```

This commit adds a joint index on these two columns, which should speed
up these queries. See Django documentation on `index_together` at

https://docs.djangoproject.com/en/1.8/ref/models/options/#index-together

7 of 7 new or added lines in 2 files covered. (100.0%)

572 of 757 relevant lines covered (75.56%)

3.0 hits per line

Relevant lines Covered
Build:
Build:
757 RELEVANT LINES 572 COVERED LINES
3.0 HITS PER LINE
Source Files on add-index-together
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
14 add-index-together add additional index to CachedGeoData @marcesher made the observation that queries against cached geodata could potentially be optimized through use of an additional index. When the cached geodata is queried in `hud_api_replace.geocode`, it's loo... push 22 Aug 2017 08:35PM UTC chosak travis-ci pending completion  
See All Builds (10)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc