5 ms·
An example is http://sqlite.org/src/timeline http://sqlite.org/src/timeline A complete log of the 200+ SQL statements used in generating the page above can be
by SQLite 10y ago
An example is http://sqlite.org/src/timeline http://sqlite.org/src/timeline
A complete log of the 200+ SQL statements used in generating the page above can be seen at http://sqlite.org/tmp/timeline-sql-log.html http://sqlite.org/tmp/timeline-sql-log.html
The list of check-ins is computed by a single query. But that query then tosses the list over the wall to another subsystem which generates content for each check-in. And several queries are required for each check-in to extract the relevant information needed for display.
The timeline example above is an information-rich page. Perhaps it could be generated using fewer than 200 SQL statements. But SQL against an SQLite database is so cheap that it has never really been a factor. You can see at the bottom of the page that it was generated in about 25 milliseconds. Profiling indicates that very few of those 25 milliseconds were spent inside the database engine.
- jstimpfle 10y agoThis is called the "n+1 queries" problem.