Hi, On 2019-02-25 22:35:37 +0100, Tomas Vondra wrote: > So let's say we want to measure the improvement this patch gives us. > What would be some reasonable (and corner) cases to benchmark? I do have > some ideas, but as you've been looking at this in the past, perhaps you > have something better.
I think queries over tables with a fair number of columns very easily stress test the list overhead around targetlists - I don't have a profile lying around, but the overhead of targetlist processing (ExecTypeFromTL etc) at execution time clearly shows up. Larger individual expressions can easily show up via eval_const_expressions() etc and ExecInitExpr(). Both probably can be separated into benchmarks with prepared statements (ExecTypeFromTl() and ExecInitExpr() will show up, but planner work obviously not), and non-prepared benchmarks will stress the planner more. I suspect there's also a few planner benefits with large numbers of paths, but I don't quite remember the profiles well enough to construct a benchmark from memory. Greetings, Andres Freund