ElementsProject / ElementsProject/lightning
basic sql query is slow
- Dominant language
- C
- Stars
- 3.1k
- Forks
- 1k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 13
Description
I am building a commando cln dashboard as a [notedeck app][clndash] using [lnsocket-rs][lnsocket]

I figured sql would be perfect for fetching invoices from my node since I have almost 400,000 invoices, mostly from nostr zaps.
unfortunately it looks like it must load all the data before limiting it ?
running: `lightning-cli sql "select * from invoices order by created_index desc limit 2"`
the process seems to spin at 100% cpu usage for a good 30 seconds before I get any results.
if someone could point me in the right direction I wouldn't mind hacking on this to improve @rustyrussell
thanks!
[lnsocket]: https://github.com/jb55/lnsocket-rs
[clndash]: https://github.com/damus-io/notedeck/tree/master/crates/notedeck_clndash
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.