Most of the other database engines have procedure languages that include CASE STATEMENTS (a version of IF / ELSE control flow statements), but I really wish they didn't. Every time I've seen one in the wild it's a mess to comprehend and maintain.
Thank you for the nice article. But I saw even worse: join predicates with a "case" statement and table rows are joined (or not) based on the result of the "when" condition 😋that contains variables and column names
Thanks for explaining and giving a fix too. I have a question, you mentioned earlier that partitioning tables are not giving performance boost as expected. What do you suggest, how can I iterate a big table over? When preparing data from it, the whole table can easily fill the temp tablespace, that is why I needed to put row numbers on it. I create a temp table containing PK and I row numbers, and joining that back to the original table to iterate over it. But that looks like an overkill.
Erik is a genius !
Happy new year keric
How did i never realize this and it was in front of my face 🤦♀️. I am loving this series btw.
Awesome! Glad you’re enjoying it! Hopefully no surgery required.
this series is great.
Most of the other database engines have procedure languages that include CASE STATEMENTS (a version of IF / ELSE control flow statements), but I really wish they didn't. Every time I've seen one in the wild it's a mess to comprehend and maintain.
Well, are you talking about SWITCH style statements or something else? I'd be curious of they have similar short circuit oddities.
Thank you for the nice article. But I saw even worse:
join predicates with a "case" statement and table rows are joined (or not) based on the result of the "when" condition 😋that contains variables and column names
That is bad yes. One might wonder just how much can be tolerated.
Thanks for explaining and giving a fix too.
I have a question, you mentioned earlier that partitioning tables are not giving performance boost as expected. What do you suggest, how can I iterate a big table over? When preparing data from it, the whole table can easily fill the temp tablespace, that is why I needed to put row numbers on it. I create a temp table containing PK and I row numbers, and joining that back to the original table to iterate over it. But that looks like an overkill.
I don't really understand the question here. Iterating over a table to do what?
Erik always tells us to not look into the armpit. He's fooling us. Under the armpit is the source of his power! True SQL ability is but a sniff away!
In France they call it l'odeur de la sagesse