Ask HN: What happened to the ORM?
My experience is strongly flavoured by developing and optimizing on the edge of what the database is able to do; and my performance condition isn&#x27;t scaling up millions of tiny trivial queries, but getting big hairy dynamically generated queries to execute efficiently within a deadline.<p>No ORM comes remotely close to being able to solve this kind of problem. The kinds of things I need to consider:<p>- analyzing select &#x2F; predicate &#x2F; order &#x2F; etc. for tables used and selectively including tables<p>- forcing query evaluation order by creating a subtable query with conditions, projecting out an id, and rejoining in the next query up<p>- analyzing predicates and rewriting predicate trees to push predicates down into subtable queries, or convert predicates into joins, or replace references to columns on other tables with denormalized columns<p>- gathering heuristics about query set size and changing query generation technique<p>- splitting queries into parallelizable queries and composing result set client-side<p>An ORM doesn&#x27;t really help me. Even a library tuned for symbolic manipulation of SQL doesn&#x27;t help hugely; my life is made much simpler when I can freely extend the SQL AST classes with my own analytic and rewrite methods.