index on db and read spent proofs from db (#370)

* index on db and read spent proofs from db

* add benchmark for testing

* remove benchmark

* add option to disable cached secrets

* disable python 3.9 tests
This commit is contained in:
callebtc
2023-11-26 06:07:38 -03:00
committed by GitHub
parent bff30d493d
commit fa5193cd8f
14 changed files with 253 additions and 164 deletions

View File

@@ -204,3 +204,13 @@ async def m009_add_out_to_invoices(db: Database):
await conn.execute(
f"ALTER TABLE {table_with_schema(db, 'invoices')} ADD COLUMN out BOOL"
)
async def m010_add_index_to_proofs_used(db: Database):
# create index on proofs_used table for secret
async with db.connect() as conn:
await conn.execute(
"CREATE INDEX IF NOT EXISTS"
f" {table_with_schema(db, 'proofs_used')}_secret_idx ON"
f" {table_with_schema(db, 'proofs_used')} (secret)"
)