-investigate FIXME

This commit is contained in:
Christian Grothoff 2022-05-02 20:51:34 +02:00
parent 0a7b75b2cf
commit 7ebdac0a8b
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -2198,10 +2198,11 @@ prepare_statements (struct PostgresClosure *pg)
",amount_frac" ",amount_frac"
",recoup_timestamp" ",recoup_timestamp"
",recoup_uuid" ",recoup_uuid"
" FROM recoup" " FROM recoup rcp"
// FIXME: suboptimal sub-query here: crosses shards! /* NOTE: suboptimal JOIN follows: crosses shards!
// MAYBE: replace reserve_out_serial_id with Could theoretically be improved via a materialized
// reserve_pub and use new reserve_out_by_reserve table? index. But likely not worth it (query is rare and
number of reserve shards might be limited) */
" JOIN reserves_out ro" " JOIN reserves_out ro"
" USING (reserve_out_serial_id)" " USING (reserve_out_serial_id)"
" JOIN reserves" " JOIN reserves"