carp icon indicating copy to clipboard operation
carp copied to clipboard

Remove unused columns from `find()` calls

Open SebastienGllmt opened this issue 2 years ago • 0 comments

For both TransactionOutput::find() and StakeCredential::find(), the generated SQL query includes too many fields in the select (notably, it includes a payload field which slows down the query)

I tried to filter the columns returned using sea-orm's .column() call, but that seems to add extra entries to the SELECT field instead of filtering down.

Will need to find if there is either a way to only select the columns we're interested in or just replace these queries with a sqlx call instead.

SebastienGllmt avatar Apr 24 '22 19:04 SebastienGllmt