▲ | HDThoreaun 3 days ago | ||||||||||||||||||||||||||||||||||||||||
Yea this is pretty fucking basic stuff. Any competent optimization engine should be doing this. "push down indexes as much as possible" is literally the first thing a query planner should be trying to do | |||||||||||||||||||||||||||||||||||||||||
▲ | ncruces 3 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||
Yes. But here they are deciding between "pushdown o.status==shipped" and "pushdown u.email==address@", in parallel both, then join (which they already did) or first doing "u.email==address@" then pushing down "u.id==o.user_id" mostly. This is a judgment call. Their planner is pretty dumb to not know which one is better, but “push down as much as possible” doesn't cut it: you need to actually decide what to push down and why. | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
▲ | zmmmmm 3 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||
I had to dig through to see the details of what database was really in play here, and sure enough, it's a wrapper around a key-value store (RocksDB). So while I'll confess I know little about RocksDB it does sound an awful lot like they threw out a mature relational database engine with built in optimization and now are in the process of paying the price for that by manually optimizing each query (against a key-value store no less, which probably fundamentally limits what optimizations can be done in any general way). Would be curious if any RocksDB knowledgeable people have a different analysis. | |||||||||||||||||||||||||||||||||||||||||
|