5 ms·
You should learn about some basic database internals. In particular the data structure for indexes, the difference between primary and secondary indexes, join a
by srcreigh 2y ago
You should learn about some basic database internals. In particular the data structure for indexes, the difference between primary and secondary indexes, join algorithms, page size being 8KiB, etc.
That knowledge gets you to a place to understand that most joins are very slow due to each DB page containing only 1% useful information for the query algorithm.
It will help you see reasons why ppl do things like put an array column in, or use wide tables, etc.
- pjs_ 2y agoWe use the tool that I wrote on a database with tens of millions of rows. Because the keys are properly indexed, we rarely have performance issues associated with joins. Joins use the index, the Postgres planner is really good, and we can join across heaps of tables with great performance. We have database performance issues for other reasons (loading of redundant information, too many queries) but not really because of joins.