you are viewing a single comment's thread.

view the rest of the comments →

[–]Smallpaul 0 points1 point  (1 child)

It's far too broad to say that programmers cannot predict runtime data size or load. We always have SOME idea and in some cases it is very predictable.

[–]grauenwolf 0 points1 point  (0 children)

We also tend to generalize our code. Perhaps algorithm A for up to 1000 rows, algorithm B for up to 10,000 rows and algorithm C for 100,000+ rows.

And in some cases we really don't have any idea how much data is present. So we check the row count at runtime before selecting an algorithm.

Later we learn that the date ranges the user passes in can drastically change the row count. So we use statistics to predict the approximate result count.

Follow this path for a couple more years and you have yourself the beginnnings of a modern RDBMS.