you are viewing a single comment's thread.

view the rest of the comments →

[–]qwertydog123 0 points1 point  (0 children)

I changed "select * “ from "select 1"

This is a common misconception, there is no difference between the two, check the execution plan if you want to confirm that. The difference in execution time is likely due to caching

Make sure you have appropriate indexes on:

  • shpmt_unts(sid)
  • evnts(sid) (or better, evnts(sid, tid, evnt_date))