That is an absolutely awful design
Denormalisation isn't awful. If it's fast and meets the needs, it's ok. Instead of beeing "rude", it was more helful if you expand this thread with useful design ideas or an own example. My example is just an example.
Do not take the 0.02 secs too mathematic. It just show that design is important. However...
This isn't correct. Query speed is dependent on the indexes being able to be held in memory on the DB server. Doesn't matter how good your DB design is you will encounter significant performance bottlenecks if the DB engine has to page the index to disk.
Yes, it is true. Size does not really matter
if the design is good. At work we have half a billion rows and the speed is like I mentioned. If it's not, it's a design mistake. And hey, everyone is allowed to split data into several tables (= denormalisation) to come to 0.02 secs
I have a B4J app using SQlite 3 million rows in ONE table and about 15 million in ONE another (plus some additional tables). Guess how long a query takes... 12 GB RAM on my PC is enough to speed it up. SQLite is incredible fast
Plenty of good queries take longer than 0.02 seconds
Sure. If it's 0.2 secs, it's ok, if it's 1 sec, maybe, but longer means
- the design isn't optimal (no, it isn't)
- the design is ok, but you are doing some kind of a
batch processing which is ok, but... I'm talking about a FAST online system
- you are doing "special" queries which are "outside the main design" (which is ok, too)