Preferences

This would be incredible to understand why some queries execute slow; most of the time it's one of the steps in between that takes 99% of the execution time at our company. Do you record the time each step takes?

Can you not use EXPLAIN ANALYZE to identify steps that had the highest compute time? I think most databases have some form of this.
This is a great command everyone should know. We once had a long running database query that was blocking a pipeline (code was written in a week and of course became integral to operations). Ran it, 15 minutes of thinking, added a new index on an now important column, and cut the run time down from almost 30 minutes to 5 seconds.
I've never heard of this, and I'm pretty sure my coworkers haven't either. Thanks for mentioning it!

https://chatgpt.com/share/68104c37-b578-8003-8c4e-b0a4688206...

You're onto the original idea I started out with! Unfortunately it's very difficult to correlate input SQL to an output query plan – but possible. It's definitely in future plans
MSSQL has the execution plan thing that will tell you which steps are involved and how long they take.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal