#database

30 bookmarks tagged with #database · RSS Feed · ← All Tags

Many Small Queries Are Efficient In SQLite

https://www.sqlite.org/np1queryprob.html
N+1 Queries Are Not A Problem With SQLite SQLite is not client/server, however. The SQLite database runs in the same process address space as the application. Queries do not involve message round-trips, only a function call. The latency of a single SQL query is far less in SQLite. Hence, using a large number of queries with SQLite is not the problem.

SQLite as a document database

https://dgl.cx/2020/06/sqlite-json-support
This makes it possible to insert JSON straight into SQLite and then have it extract data and index them, i.e. you can treat SQLite as a document database. This has been possible with PostgreSQL and obviously is what something like Elastic provides but having it available in an embedded database is very nice for lightweight stuff.

CouchDB "Joins" - Christopher Lenz

http://www.cmlenz.net/archives/2007/10/couchdb-joins
Obvious to Damien, but not at all obvious to the rest of us: it's fairly simple to make a view that includes both the content of the blog post document, and the content of all the comments associated with that post. The way you do that is by using complex keys. Until now we've been using simple string values for the view keys, but in fact they can be arbitrary JSON values, so let's make some use of that:

Don't use MongoDB | Hacker News

http://news.ycombinator.com/item?id=3202081
From CTO of 10gen First, I tried to find any client of ours with a track record like this and have been unsuccessful. I personally have looked at every single customer case that’s every come in (there are about 1600 of them) and cannot match this story to any of them. I am confused as to the origin here, so answers cannot be complete in some cases.

Spock Proxy

http://spockproxy.sourceforge.net
"Spock Proxy supports range-based horizontal paritioning of a large MySQL database. The proxy intercepts SQL queries from the client, sends queries to the correct databases based on how the database is partitioned, then aggregates the results from each database and returns them to the client as a regular MySQL result set. "