Комментарии:
From what’s I’ve seen, CTE’s are criminally underused. They help with DRY and even on OLTP oriented databases like Oracle and SQL server they act as pass-throughs so the optimizer can “see through” the indirection in most cases, so there’s not even a performance penalty.
ОтветитьSo u read from someone else blog and made a video outta it
ОтветитьThis is the best indexing explanation I have seen anywhere on the internet. Period!
Ответить#1, So valid, it's not even funny! I work on a data warehouse and let me tell you, this is rule number one for a reason!
ОтветитьAppendix or index in a book?
Ответитьno examples
ОтветитьSounds like great tips but as a beginner / intermediate it would be great to see some actual before / after code examples. It's easy to get lost without visuals.
ОтветитьI dont understand the point 2# use temp tables.
Other advice i read says avoid temp tables like the plague.
So what gives?
Could you please explain how can I make a loop in Presto sql?
ОтветитьThanks, very well said.
ОтветитьIf you used examples when it would be better
ОтветитьThanks :) went from more than 2 minutes query down to 750 ms average :D
ОтветитьNice, thx
Ответить#1 Use filter Data Set
#2 Use temp tables/ CTEs
#3 Don't repeat yourself (Dry)
#4 Use indexes
#5 Be consistent
This is just a theory! Wanted to see some examples :(
ОтветитьExcellent.
Ответить#3
Let's say I have a query with 2 exact same subqueries, is it possible to write a subquery once and use it again somehow?
Informative.
ОтветитьSomething that would add value here for me would be showing examples. I'm a little newer to SQL, so actually looking at examples would be helpful! This video may have been aimed at more advanced users, so that makes sense, but this is just my input!
Thanks for taking the time to make this and listen to our feedback!
Useful advice
Ответить