Add a table to hold only the Symbols
to improve performance.
This commit is contained in:
@@ -18,6 +18,10 @@ find . -maxdepth 1 -name 'quoteStore_202*.sqlite3.gz' | while read db; do
|
||||
sqlite3 /tmp/xx.sqlite3 'drop table OptionQuotes;'
|
||||
sqlite3 /tmp/xx.sqlite3 'alter table tmp rename to OptionQuotes;'
|
||||
sqlite3 /tmp/xx.sqlite3 '.dump OptionQuotes' | sqlite3 consolidated.sqlite3
|
||||
|
||||
echo filling symbols table
|
||||
sqlite3 consolidated.sqlite3 'insert INTO Symbols select DISTINCT Symbol from OptionQuotes where OptionQuotes.Symbol not in (select Symbol from Symbols);'
|
||||
|
||||
rm /tmp/xx.sqlite3
|
||||
if [[ "$delete" == "1" ]]; then
|
||||
echo deleting...
|
||||
|
||||
Reference in New Issue
Block a user