Skip to content

Commit

Permalink
Add index to Market ID
Browse files Browse the repository at this point in the history
This will improve performance of looking up stations used for rare goods.

Would have done this earlier, but I'd forgotten how easier I had made it to do.
  • Loading branch information
iaincollins committed Oct 3, 2024
1 parent 18cb5c1 commit 2cc1744
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/db/trade-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function ensureIndexes () {
getDatabase().exec('CREATE INDEX IF NOT EXISTS commodities_sellPrice ON commodities (sellPrice)')
getDatabase().exec('CREATE INDEX IF NOT EXISTS commodities_demand ON commodities (demand)')
getDatabase().exec('CREATE INDEX IF NOT EXISTS commodities_stock ON commodities (stock)')
getDatabase().exec('CREATE INDEX IF NOT EXISTS commodities_marketId ON commodities (marketId)')
}

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ardent-collector",
"version": "1.55.0",
"version": "1.55.1",
"description": "Ardent Collector saves data submitted to EDDN",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 2cc1744

Please sign in to comment.