Re:Bye Bye Mongo, Hello Postgres
by zimpenfish on Thursday December 20, 2018 @12:57AM
(#18722796)
> Like you write a simple looking query and it turns out to have O^2 complexity
Or you have a simple fast query with a lovely plan until the database engine decides that because you now have 75 records in the middle table instead of 74, the indexes are suddenly made of lava and now you're table-scanning the big tables and your plan looks like an eldritch horror.
[Not looking at MySQL in particular, oh no.]
In practice people who fall into complexity traps are usually asking a lot more of their database engine than any beginner. It's usually not that hard to figure out the approximate cost of a particular query.