-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
151 increase trade query performance (#152)
* add index for latest market datum buy_price, sell_price, stock, demand. pricing may not need indexing for trade algo but will improve commodity look up and commodity market view Add index for station arrival distance
- Loading branch information
1 parent
8115f03
commit 83a0318
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...esources/db/trademodule/changelog/add_latest_market_datum_demand_supply_price_indexes.xml
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,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> | ||
|
||
<changeSet id="add_latest_market_datum_demand_supply_price_indexes" author="daniel-j-mason"> | ||
<createIndex indexName="idx_latest_market_datum_buy_price" tableName="latest_market_datum"> | ||
<column name="buy_price" /> | ||
</createIndex> | ||
|
||
<createIndex indexName="idx_latest_market_datum_sell_price" tableName="latest_market_datum"> | ||
<column name="sell_price" /> | ||
</createIndex> | ||
|
||
<createIndex indexName="idx_latest_market_datum_demand" tableName="latest_market_datum"> | ||
<column name="demand" /> | ||
</createIndex> | ||
|
||
<createIndex indexName="idx_latest_market_datum_stock" tableName="latest_market_datum"> | ||
<column name="stock" /> | ||
</createIndex> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
13 changes: 13 additions & 0 deletions
13
...module/src/main/resources/db/trademodule/changelog/add_station_arrival_distance_index.xml
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,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> | ||
|
||
<changeSet id="add_station_arrival_distance_index" author="daniel-j-mason"> | ||
<createIndex indexName="idx_station_arrival_distance" tableName="station"> | ||
<column name="arrival_distance" /> | ||
</createIndex> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
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