News for hackers. Stuff that matters.
Re:Postgres Demystified by ysangkok on Monday March 25, 2013 @06:37AM (#5436354)
Sounds like you need strong AI. :) But really, isn't that like wishing the compiler would find out if you need a priority queue or a stack? Or rewriting your n² sort automatically to n log n?
Re:Postgres Demystified by rogerbinns on Monday March 25, 2013 @02:25PM (#5438680)
No, it is more like the compiler working out that when you say x=0 whether it should be done by loading a literal, using a zero register or xorring the register with itself.

Note that you don't actually need strong AI. Look at what MongoDB does http://docs.mongodb.org/manual/core/read-operations/#query-o...

Essentially it is dumb in that it tries multiple query plans concurrently, figuring out which was most efficient and using that in the future, monitoring its expected performance and trying all candidates again when it deviates.

With modern systems having such a surplus or CPU, RAM and storage a dumb system could try multiple indexing strategies, and work out which worked best.