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.

How the SQLite virtual machine works

390 pointsby danielskoglyover 2 years ago

11 comments

maniminoover 2 years ago
These blog posts have been great. I&#x27;d love to see a deep dive on the query planner at some point.<p>I&#x27;ve done lots of benchmarking SQLite while writing ducks [1], and found some interesting stuff. It seems like SQLite will only use one index, even in cases where two indexes would better suit the query. Or, in cases where the query is fetching most of the table, it will use an index even though a full scan would actually be much faster.<p>Don&#x27;t get me wrong, SQLite is awesome, and it&#x27;s quite possible to work around these behaviors. Just interested in why they&#x27;re not built in.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;manimino&#x2F;ducks" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;manimino&#x2F;ducks</a>
评论 #32751880 未加载
评论 #32751601 未加载
评论 #32768594 未加载
评论 #32756337 未加载
skadamatover 2 years ago
&gt; SQL was originally designed for non-technical users to interact with the database, however, it&#x27;s used almost exclusively by software developers peppering it throughout their applications.<p>Interesting claim! In my experience, the # of data analysts &#x2F; BI analysts &#x2F; etc that write and have mastered SQL vastly exceeds the # of web developers (especially if we focus on developers actually writing SQL instead of using ORMs)
评论 #32751718 未加载
评论 #32752521 未加载
评论 #32752155 未加载
bob1029over 2 years ago
The EXPLAIN keyword is really awesome. It also allows you to quickly validate SQLite command text without actually executing it. We have found this to be useful for real-time validation of user inputs when working on SQL-based config tools.<p>Note that EXPLAIN also seamlessly incorporates any application-defined functions, so you can validate <i>everything</i> is as expected. Useful when being clever with DSLs and such.
评论 #32760869 未加载
spullaraover 2 years ago
Most people probably don&#x27;t know this but SQLite is used under the covers for most Mac OS applications like Photos and Mail. Been that way for a long time and lets you do some interesting data mining.<p>e.g. <a href="https:&#x2F;&#x2F;javarants.com&#x2F;build-your-own-mail-analyzer-for-mac-mail-app-747143e94ccc" rel="nofollow">https:&#x2F;&#x2F;javarants.com&#x2F;build-your-own-mail-analyzer-for-mac-m...</a>
评论 #32756034 未加载
avl999over 2 years ago
I wonder how an alternate timeline might have played out if Richard Hipp had not named it &quot;SQLite&quot; and instead called it &quot;SQLightning&quot; or &quot;SQLExpress&quot; or something like that. For much of its lifetime, SQLite wasn&#x27;t taken seriously despite being an extraordinary technology and part of me is convinced it was in large part due to &quot;Lite&quot; being in the name.
评论 #32752900 未加载
评论 #32752531 未加载
评论 #32753970 未加载
评论 #32752674 未加载
评论 #32754451 未加载
评论 #32752328 未加载
评论 #32752516 未加载
评论 #32757221 未加载
评论 #32753007 未加载
评论 #32752901 未加载
评论 #32760585 未加载
einpoklumover 2 years ago
The post does not describe a virtual machine, nor does it really describe how SQLite, specifically, works, as opposed to other DBMSes.
评论 #32757596 未加载
评论 #32754543 未加载
mbarisover 2 years ago
I really like this series of blog posts on SQLite, thanks if you are reading this. It was really informative for me since I did not know much about its internals before
评论 #32751362 未加载
endisneighover 2 years ago
I see so many SQLite posts these days, but which companies with a lot (&gt;1M) concurrent users are using SQLite in a non embedded fashion?<p>It just seems so academic. I’d like to use a web service or app backed primarily by SQLite and see how it goes.
评论 #32752723 未加载
评论 #32753914 未加载
评论 #32752589 未加载
评论 #32752445 未加载
评论 #32752545 未加载
评论 #32756942 未加载
评论 #32754395 未加载
评论 #32752752 未加载
ngcc_hkover 2 years ago
Surprise a bit about the intent of sql. C J Dates of those days had no hint of that. Need to know set theory to understand what is going on I thought.
oxffover 2 years ago
For some reason, IME, SQLite feels the hardest to use of the popular databases. I did start my own database journey with Postgre and MSSQL so I feel kind of lost with SQLite whenever I use it.
评论 #32754503 未加载
评论 #32764602 未加载
purimover 2 years ago
Any dates on supporting range of ports to my running sqlite&#x2F;db instance on? ex) 5999-8999<p>edit: not sure why this is being downvoted? not being able to define a range of port seems like a huge oversight. the forums there are not very active so I am asking here.
评论 #32754535 未加载
评论 #32757656 未加载