TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Outlandish Recursive Query Examples

4 pointsby pkilgoreabout 2 years ago

1 comment

blacksqrabout 2 years ago
I&#x27;ve been been experimenting with recursive queries in SQLite, and they seem rather unreasonably performant. I&#x27;ve tried comparing the performance of some of the given examples with imperative code that duplicates the recursion and makes the requisite queries individually using the SQLite API. You might expect the CTEs to perform better, but I&#x27;ve seen them doing an order of magnitude better, which rather surprised me.<p>Congratulations to the author who must have made some rather intensive optimizations to make recursion work so well within the context of SQL, which the paradigm was not designed for.