Love these quick, yet so informative videos. Please keep them coming. Thank you!
@TheMagicofSQL2 күн бұрын
You're welcome; glad you appreciate these. I certainly plan to keep publishing these :)
@ilpaolotopleggend666312 күн бұрын
Thanks
@francodominguez30412 күн бұрын
Bro, thank you very much for all the knowledge you transmit. Out of curiosity, what is the IDE you use in your videos? Are you using any VSCode extension? Greetings from Argentina!
@TheMagicofSQL2 күн бұрын
Thanks - you're welcome. I create these using an internal tool here at Oracle
@onehmong936817 күн бұрын
Always nice
@onehmong936817 күн бұрын
Nice
@onehmong936819 күн бұрын
Huh
@mprokop619 күн бұрын
no audio?
@TheMagicofSQL19 күн бұрын
No - is it necessary?
@mprokop619 күн бұрын
@@TheMagicofSQL If this was intentional, then nvm
@mprokop619 күн бұрын
It's just quite common for videos to have some kind of voiceover
@TheMagicofSQL19 күн бұрын
Yeah - I'm experimenting to see how this works. I can try talking over these if you're keen to hear my voice ;)
@chungusmcjaxx579921 күн бұрын
Thanks. Explained visually nested loops in 90 seconds. Appreciate your method with cards. Thank you.
@TheMagicofSQL20 күн бұрын
You're welcome; glad you appreciate it!
@avimcrypto22 күн бұрын
Can i change the query snap UI... Different to see and to understand... Can u make some changes in video... And make graphic easier
@TheMagicofSQL22 күн бұрын
What changes do you want to see? What would make graphic easier?
@onehmong936827 күн бұрын
So serious man. I swear they would crucify me if I write sql in lower cases. Thanks
@TheMagicofSQL27 күн бұрын
If you're using a standard formatter for SQL, it makes sense to use the same case for all statements. If not, there's much more important things to get worked up about!
@onehmong936827 күн бұрын
@TheMagicofSQL nice
@onehmong936828 күн бұрын
Aaah I don't feel too bad writing sql in lower case like in c and c++
@TheMagicofSQL27 күн бұрын
Lowercase is the way!
@nguyennguyenkhoi7111Ай бұрын
Thanks bro, It's really nice and clear explaination. However, I still have 1 question. Why do we need to run "Hash Function" in the whole table? Why don't we hash 5 cards and do the JOIN?
@TheMagicofSQLАй бұрын
See my response to ArthurMontgomery-d2p - how do you know which 5 rows to pick from the first table?
@pablolocles9382Ай бұрын
But doing that you won't achieve the best performance using indexes and keys. Join handles it much better, even if you don't use the other table outputs.
@TheMagicofSQLАй бұрын
Can you demonstrate a case where that happens? Oracle Database transforms IN/EXISTS into joins under the covers, so the performance of these three should be identical
@FiruzzZ-777Ай бұрын
flawless explanations!, you deserve your hair back
@TheMagicofSQLАй бұрын
😂 thanks!
@staykings6943Ай бұрын
Thanks for this 💱
@IncredibleAdventure1Ай бұрын
Hello Chris, I have one question regarding order by. Does Oracle Database sort results in ascending order based on the first column of the first query when using set operator Union implicitly(by default)?
@TheMagicofSQLАй бұрын
No. If you use UNION ALL the database just combines the data sets. If you use UNION it'll add a deduplication step. This *might* be implemented using a sort. A hash is more likely though.
@francisantony12Ай бұрын
This helped me a lot. Thank you for this video
@TheMagicofSQLАй бұрын
You're welcome! Glad this is useful
@ArthurMontgomery-d2p2 ай бұрын
Great video. Thanks. But I didn't understand the reason why the example of joining only five cards in the outer deck shows the disadvantage of hash join (from 8:17 to 8:25). I mean, why can't we simply apply the hash function to those five values? That only costs five operations to construct the hash memory structure?
@TheMagicofSQL2 ай бұрын
How do you know what the top five values are before doing the join? If you want to (inner) join t1 to t2 and get the first five joined rows there's no general way to pick five from t1 that will join to t2. The values you pick from t1 may have no match in t2. Using a hash, you have to read all the rows from t1. Then join to t2, stopping as soon as you have five rows in the results.
@ArthurMontgomery-d2p2 ай бұрын
@@TheMagicofSQL Thanks for the clarification! I took the five cards as already known.😅
@nishanksoni71202 ай бұрын
1.Nested Join - nested for loop - O(N * N) - easiest to implement - time consuming for large dataset - better with either small datasets or index on join attributes 2.Merge Join - sort them first and compare - O(NlogN) + O(NlogN) - Efficient for large datasets - pre-join preparation required (sorting) - scanning of relation happens once while joining - can leverage indexes if available to make it faster 3.Hash Join - using hashing - not good for range queries - creating a hashtable for the query you are searching ( user_id is the key) - used for equi joins - efficient for large datasets - requires additional memory - pre join preparation required -> hash table construction - Hash function should distribute data evenly SQL Engine : Take a look at data , look statistics across all table using cardinality
@TheMagicofSQL2 ай бұрын
Nice summary. Though - at least in Oracle Database - hash join is worse than "not good" for range queries. The optimizer won't use it at all!
@sandhu012 ай бұрын
Very well put 👏 @6:20 - 52*log52 equals 296.4 because the base is 2 not 10.
@TheMagicofSQL2 ай бұрын
52 * ln 52 ~ 205 isn't it? :) In any case, the exact numbers don't matter too much here - they will vary depending on the algorithm used. It's more the relative size of operations needed for each join type.
@sandhu012 ай бұрын
@@TheMagicofSQL thanks for the reply! Understood! That's why appreciation was in first place :)
@PradeepKanaparthy2 ай бұрын
HI please one more favour. need post on tuning complex query having multiple joins with example to see changes before tuning and after tuning. some of the tuning changes or tips and how they affect the query and make quick access or give response
@TheMagicofSQL2 ай бұрын
I recently ran an Ask TOM Office Hours session going through some real world tuning examples - see the recording at kzbin.info/www/bejne/m6itkqCEipt8j5I
@PradeepKanaparthy2 ай бұрын
@@TheMagicofSQL Thank you 😊
@surajkumarsingh48572 ай бұрын
Wow What an Explanation : )
@TheMagicofSQL2 ай бұрын
Thanks :)
@danpd12383 ай бұрын
nice video!
@user-qb7cc3cw7l3 ай бұрын
Please go little so your accent not comfortable for asians😢😢
@andrevinicius1373 ай бұрын
Pure Gold!
@NuProg4 ай бұрын
I have to create index for a huge table (In Gigabytes) for a new column. But when we tried this, it is bringing down the system completely so we had to drop that. Is there any way we can create this index without downtime.
@TheMagicofSQL4 ай бұрын
I'm unsure what "bringing down the system completely" means exactly. In Oracle Database you can CREATE INDEX ... ONLINE which allows the database to write to the table while creating the index which may help here.
@NuProg4 ай бұрын
@@TheMagicofSQL Thank you for the quick reply. 'Bringing down' - I was meaning that the CPU and memory were full due to the size of the table and was taking hours to complete. So is there a way to create index in a performant way on this table?
@TheMagicofSQL4 ай бұрын
While a table in the gigabytes is big, it still shouldn't take hours to create an index on it. Creating an index will only use 1 cpu by default. So either the system only has a couple of cpus (in which case you should look at getting more) or it's running in parallel - reducing the parallelism will help. I would still start by using the ONLINE keyword when creating the index before trying anything else though. It might take a long time, but other operations should continue normally (unless your system does have to few CPUs for the workload)
@NuProg4 ай бұрын
@@TheMagicofSQL Thanks again. I shall try this and will update here on how it goes.
@emilemary4 ай бұрын
Excellent presentation, the best SQL course!! I love the creativity in your videos. Thank you so much!!
@TheMagicofSQL4 ай бұрын
You're welcome, glad you appreciate these!
@HarrietOmboga4 ай бұрын
I like how its explained though I dont get most of it
@TheMagicofSQL4 ай бұрын
What is it you're struggling to understand?
@SinskariBoi3366three4 ай бұрын
Refreshing
@hindimotivation52315 ай бұрын
I am not able to understand the autotrace part where view part individual elapsed time is 728 micro seconds. How this was calculated , Please elaborate. Thankyou.
@hindimotivation52315 ай бұрын
One more doubt , in 3rd sort operation why it dont have any elpsed time as you said in video.
@TheMagicofSQL5 ай бұрын
I'm not sure exactly what you're referring to - please clarify. In any case, this value comes from the database measuring how long the operation took.
@TheMagicofSQL5 ай бұрын
Again, I'm not sure exactly what you're referring to.
@IgorSadovskii6 ай бұрын
usefull explanation ! thanks a lot!
@robertczaja1766 ай бұрын
Well explained!
@robertczaja1766 ай бұрын
Perfect video! You can explain things that everyone can understand it!
@dothanhlong18476 ай бұрын
.
@AndrewCoffman-jq9ld6 ай бұрын
Been doing MSSQL for 20 years and this was by far the best explanation of these joins. Thanks!
@TheMagicofSQL6 ай бұрын
You're welcome!
@vialvial12466 ай бұрын
Best explanation! Thank you sir!
@sorryShen6 ай бұрын
❤
@Somosphere6 ай бұрын
First time came across such good explanation of these 3 kind of joins. Kudos !!!
@sumeetpalit63626 ай бұрын
Thats the first time i understood how these joins worked... 😅