Day after day, I sit here crafting data for some vague analytics with Postgres, close to despair. All I want is for the query planner to take a view, go away for five or ten minutes, and then run it optimally, or at least suggest some indexes, but this isn't the way it seems to want to allocate resources.
I suppose I've always been slightly suspicious of modern database technology beyond stodgy stuff like Oracle, SQL Server, MySQL and PostgreSQL, but I'm at the point when I would like to know what my options are.
I don't think my workload is particularly outlandish - 35m events with around 100 attributes, timestamped, some GIS data. Some typical workloads include things like sessionization, grouping events together, and asking questions like "how long after events of type X did an event of type Y happen?", "what was the last event in session Z?", "how long is the path from event A to B to C?" On top of that, all sorts of aggregates get computed over events. Training data gets extracted and predictions fed back in via bits of Clojure or R code.
I am reasonably au fait with modern SQL, I write a lot of window functions, I avoid some common pitfalls, I can generally index my way out of most performance bottlenecks, but my word it feels like a slog some days. So, I suppose my question is this: what am I missing? What fancy new technology exists that can take complex queries, optimise them and give me answers. I don't care about scaling to millions of requests, I don't care about latency, I care about how much time I'm losing looking through EXPLAIN ANALYZE outputs instead of doing real work.
I wanna say it was around $1500/seat last time I looked at it. It's worth every penny if you have to write a lot of complex queries. I've bought it for just one senior member of a dev team, and everybody brings their worst queries to that person for tuning.
Here's the trick, though: after it optimizes a query for you, keep your original query around. You're not going to want to try to edit the query that Toad produces - it can be horrifically complex. Instead, edit your original query, then run it through Toad again.