Add a table to hold only the Symbols

to improve performance.
This commit is contained in:
Joe Tretter
2020-09-23 10:14:12 -05:00
parent 05a55f6434
commit 1fdf705eb5
4 changed files with 14 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ module.exports = compress(async (req, res) => {
if (func === "/getSymbols") {
console.log("Request for Symbols");
const db = new Database('./quoteDBs/consolidated.sqlite3', { verbose: console.log });
const stmt = db.prepare("SELECT distinct Symbol FROM OptionQuotes order by 1");
const stmt = db.prepare("SELECT distinct Symbol FROM Symbols order by 1");
let allDates = stmt.all();
//console.log(JSON.stringify(allDates));
db.close();