Skip to content

Commit

Permalink
Add an index to speed up getting all the releases for a distribution.
Browse files Browse the repository at this point in the history
Gitpan does this.  A lot.
  • Loading branch information
schwern committed Oct 26, 2014
1 parent 87d39f9 commit 8ba25c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/BackPAN/Index/Database.pm
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ has create_indexes_sql =>

# Let us order releases by date quickly
"CREATE INDEX IF NOT EXISTS releases_by_date ON releases (date, dist)",

# Quickly get all the releases for a given distribution
"CREATE INDEX IF NOT EXISTS releases_for_dist ON releases (dist)",
]
};

Expand Down

0 comments on commit 8ba25c5

Please sign in to comment.