I have a long (and long running, ~30min depending on load) query. It has multiple statements UNION'ed together. Most of the statements are using the
- Is the function executed once or multiple times?
- If multiple times, would putting it into a
WITHstatement and then
SELECT timestamp FROM <WITH statement>making it getting executed only once?