chainquery icon indicating copy to clipboard operation
chainquery copied to clipboard

Add index on "effective_amount" in claims table

Open marcdeb1 opened this issue 4 years ago • 0 comments

If we want to fetch statistics on content on Chainquery, such as Top claims, we need to have an index on the effective_amount column. https://chainquery.lbry.io/api/sql?query=SELECT%20*%20from%20claim%20order%20by%20effective_amount%20desc%20LIMIT%2010

Otherwise, the query is too slow. It would open a world of possibilities for statistics based on Chainquery.

marcdeb1 avatar Jan 30 '21 13:01 marcdeb1