Home
Videos uploaded by user “The Magic of SQL”
Query Tuning 101: How to Compare Execution Plans
 
04:12
When you're tuning SQL query there's two important questions to keep in mind: * Have my changes made any difference? * If they have, is performance better or worse? In this video we'll look at how you can use SQL Developer to compare execution plans. This will enable you to differences between them and determine which plan performs better. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 14423 The Magic of SQL
Query Tuning 101 How to Run Autotrace in SQL Developer
 
02:21
This video shows how to run autotrace reports using Oracle SQL Developer to analyze query performance. It also discusses the privileges you need to enable database users to run autotrace. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 17985 The Magic of SQL
Tables: Databases for Developers #1
 
03:19
Tables are the foundation of your database. There are several types of table available in Oracle Database. In this episode, Chris gives an overview of the tables you can use. Take the Databases for Developers class at https://devgym.oracle.com/devgym/database-for-developers.html Subscribe for more videos on database, SQL and magic: https://www.youtube.com/c/TheMagicofSQL?sub_confirmation=1 For daily SQL tips follow SQLDaily on Twitter: https://twitter.com/sqldaily ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 21731 The Magic of SQL
Why Is My Query Slow? More Reasons Storing Dates as Numbers Is Bad
 
05:25
Storing dates as numbers can cause unexpected problems. In this video Chris looks at one possible issue: inconsistent query performance. He then shows methods you can use to improve performance, including function-based indexes and histograms. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 6817 The Magic of SQL
Query Tuning 101 What to Look for in Autotrace Output
 
02:58
You're up and running with autotrace, looking at the actual execution plan for a query. Now the real work begins! What is it you're actually looking for in the execution plan? This video shows what you need to investigate and how to use the HotSpot feature of SQL Developer 4.1 to highlight parts of the query you need to pay attention to. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 7777 The Magic of SQL
Joins: Databases for Developers #5
 
05:09
You use a join to return related rows from two or more database tables. In this episode, Chris gives a quick rundown of the following types of join: - Inner join - Outer join - Full outer join - Cross join For more details on joins, read the Oracle Database SQL Language reference: http://docs.oracle.com/database/122/SQLRF/Joins.htm#SQLRF52355 Take the Databases for Developers FREE SQL course at https://devgym.oracle.com/devgym/database-for-developers.html Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 5638 The Magic of SQL
A Story of Indexes and Full Table Scans: Finding All the Red Sweets Part 1
 
08:43
"Why isn't Oracle using my index?!" is a common question people have when tuning SQL queries. In this episode Chris compares two methods for finding all the red candies from party bags he's prepared. He shows how these are like a full table scan and an index range scan. He goes on to compare the performance of these two approaches. He shows when a full table scan becomes more efficient than an index range scan and vice versa. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 7706 The Magic of SQL
Select and Where: Databases for Developers #4
 
05:03
You query a database table with a select statement. But unless you provide a where clause, this will return you all the rows! That's a lot for you to sift through if your table has millions, billions or trillions of rows. In this episode Chris discusses common conditions for filtering rows so the database only returns what you need. Further reading: Oracle Database 12.2 select syntax: http://docs.oracle.com/database/122/SQLRF/SELECT.htm#SQLRF01702 Oracle Database Concepts Guide on Select: http://docs.oracle.com/database/122/CNCPT/sql.htm#GUID-702909E1-B214-4D30-A0F9-5A4335C2BA4A Take the Databases for Developers FREE SQL course at https://devgym.oracle.com/devgym/database-for-developers.html Daily SQL tips on Twitter: https://twitter.com/SQLDaily Chris on Twitter: https://twitter.com/ChrisRSaxon All Things SQL Blog: https://blogs.oracle.com/sql ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 5610 The Magic of SQL
Data Modeling: Databases for Developers #3
 
06:26
How do you decide which table and column to store each aspect of your data? In this episode, Chris discusses things to consider when making this choice. He also compares document and relational modeling, going into the pros and cons of each. Take the Databases for Developers FREE SQL course at https://devgym.oracle.com/devgym/database-for-developers.html Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 8191 The Magic of SQL
Query Tuning 101: Access vs. Filter Predicates In Execution Plans
 
02:08
Have you ever wondered what the difference is between the "filter predicates" or "access predicates" steps listed in execution plans - or even what a predicate is? If so, watch this video to find out! Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 4767 The Magic of SQL
Aggregates and Group By: Databases for Developers #6
 
05:34
Want to count how many rows your query returns? Or the number of orders per customer? Or find your fastest time to run races of 1k, 5k and 10k? You can answer all these questions in SQL using group by and aggregate functions. Watch this video to find out how! For a complete list of aggregate functions available in Oracle Database 12.2 g to: http://docs.oracle.com/database/122/SQLRF/Aggregate-Functions.htm#SQLRF20035 Take the Databases for Developers FREE SQL course at https://devgym.oracle.com/devgym/database-for-developers.html Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 4649 The Magic of SQL
How Does the Phyiscal Location of Rows Affect Indexes?: Finding All the Red Sweets Part 2
 
09:25
In part one of the red candy series, Chris compared the efficiency of using a index range scan and full table scan to access data. He found that a full table scan was more efficient when fetching more rows than there are table blocks. This analysis made a big assumption however. It worked on the presumption that there was no correlation between the order of candies in the document and which the bags they were in. In this episode tests this assumption. Chris looks at how the physical order of rows in a table can affect the efficiency of indexes on it. He discusses how Oracle tracks this via the clustering factor. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 3120 The Magic of SQL
Which Order Should Columns Go in an Index?: Finding All the Red Sweets Part 4
 
06:19
When you create an index on multiple columns there's an important question you need to answer: In which order should you list the columns? This video looks at some of the factors you should consider to help answer this question. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 3913 The Magic of SQL
Insert and Commit: Databases for Developers #7
 
04:51
You load data into your database tables with an insert statement. In this episode Chris discusses how to use single and multirow inserts and their pros and cons. He also covers how to persist your changes to the database with commit. See the full syntax for insert in the SQL reference guide: http://docs.oracle.com/database/122/SQLRF/INSERT.htm#SQLRF01604 Take the Databases for Developers FREE SQL course at https://devgym.oracle.com/devgym/database-for-developers.html Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 5165 The Magic of SQL
The Vanishing One Second Waits
 
08:55
In this video Chris uses performance black magic to make a query that should take three seconds execute instantly. Watch the video to find out how you can use the same technique to reduce the execution time of your queries. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 1539 The Magic of SQL
Query Tuning 101 Why Use Autotrace
 
01:38
When you're optimizing SQL queries you need to understand what they're actually doing. Explain plan is a commonly used tool with a major flaw - the reported plan and actual plan can be different! This video demonstrates this with a simple query, showing how autotrace reports the correct execution plan for the SQL statement. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2266 The Magic of SQL
Analytic Functions: Databases for Developers #13
 
05:42
Analytic or windowing functions are one of the most powerful features of SQL. They allow you do to things like: - Add running totals - Generate row numbers - Calculate moving averages This video explains how to use them to analyze your data. Want to learn more? Take the course! https://devgym.oracle.com/pls/apex/dg/class/databases-for-developers-next-level.html Further reading: Analytic functions in the docs: https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/Analytic-Functions.html Analytic SQL video series: https://www.youtube.com/watch?v=0cjxYMxa1e4&list=PLJMaoEWvHwFIUwMrF4HLnRksF0H8DHGtt Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 865 The Magic of SQL
The Magic of SQL: Column Update Mystery
 
07:20
You use the update statement in SQL to modify existing values in a row. Normally you have to assign values to each column explicitly. In this video Chris updates the value in one column and also changes the value in another column - without any triggers in sight! Watch the video to see how it's done! ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 6388 The Magic of SQL
Hierarchical Queries: Databases for Developers #16
 
09:38
Often data contains a parent-child relationship between rows in the same table. For example, company org charts and family trees. You can use the power of SQL to traverse these hierarchical relationships. There are two ways to do this in Oracle Database: - Connect By - Recursive With Watch this video to learn about data trees and find out how these work! Further reading: Hierarchical queries in the docs: https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/Hierarchical-Queries.html#GUID-0118DF1D-B9A9-41EB-8556-C6E7D6A5A84E Recursive subquery factoring in 11.2: https://oracle-base.com/articles/11g/recursive-subquery-factoring-11gr2 Take the course! https://devgym.oracle.com/pls/apex/dg/class/databases-for-developers-next-level.html Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2058 The Magic of SQL
A Story of Index Only Scans: Finding all the Red Sweets Part 3
 
05:25
So far in the red candy series, Chris has compared using an index to a full table scan to access sweets from his table. In this video he asks a different question: What if you just want to count how many sweets are red? In this case the index holds all the information Oracle needs to answer the query. He shows how the optimizer is able to process this via an index only scan. Chris goes on to investigate index only scans further. He discusses how theses can provide better performance than queries accessing the table itself. He finishes by looking at the conditions necessary to enable these. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 1683 The Magic of SQL
What Impact Do Indexes Have on Inserts?: Finding All the Red Sweets Part 0
 
04:01
Creating indexes can improve query performance. Oracle must maintain the indexes however. This increases the work it must do whenever you modify data in indexed columns. In this video Chris looks at this overhead using a real world analogy - recording the color of all the candies stored in party bags! ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2591 The Magic of SQL
Delete and Truncate: Databases for Developers #9
 
04:40
Oracle Database offers two commands for removing data from tables: delete and truncate. In this video Chris discusses the difference between these methods. He also covers how to "remove" rows using soft-deletes. Virtual Private Database https://docs.oracle.com/database/122/DBSEG/using-oracle-vpd-to-control-data-access.htm In-Database Archiving https://docs.oracle.com/database/121/VLDBG/GUID-5A76B6CE-C96D-49EE-9A89-0A2CB993A933.htm#VLDBG14154 This video forms part of the Databases for Developers bootcamp. You can take this course by going to: https://devgym.oracle.com/devgym/database-for-developers.html Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2975 The Magic of SQL
Schema Wars Episode 1: The Unstructured Menace
 
07:53
On a distant planet in a far away place... Sequella wants to build an App to cure her brother's illness. But her work requires changes to The Database. These are rejected by the overbearing Master DBA. She calls in Jason, leader of The Underground, to help her. Will he be able to find a way to assist her? ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2850 The Magic of SQL
How Many Indexes Are Too Many?: Finding All The Red Sweets Part 5
 
10:58
Every index you add to a table increases its storage requirements and DML overheads. So it's a good idea to create as few as possible. When you have two or more indexes using the same columns, you may be able to get away with just one. But how do you decide which to keep? This video discusses how to analyze your queries so you can cut the number of indexes you create. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2134 The Magic of SQL
The Magic of SQL: The Magical Changing Row
 
05:25
To change the value of a database column normally you need to execute an update statement. In this video Chris uses SQL magic to modify the value of a row without issuing any insert, updates or deletes! Watch the video to find out how ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2815 The Magic of SQL
Update and Transactions: Databases for Developers #8
 
07:11
In this episode Chris discusses the ins and outs of using updates to change data in existing rows. Watch this to learn how to write update statements and avoid the dangers of deadlock and lost updates. Oracle Database SQL Language reference for update: http://docs.oracle.com/database/122/SQLRF/UPDATE.htm#SQLRF01708 Take the Databases for Developers FREE SQL course at https://devgym.oracle.com/devgym/database-for-developers.html Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2017 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 3642 The Magic of SQL
Pivot & Unpivot: Databases for Developers #14
 
07:24
Sometimes you want to convert rows to columns. Or convert columns back into rows. Luckily SQL has two clauses to help you do this: PIVOT & UNPIVOT Using these you can easily transform your rows to columns and back again. Want more? Take the course: https://devgym.oracle.com/pls/apex/dg/class/databases-for-developers-next-level.html Read the blog post: https://blogs.oracle.com/sql/how-to-convert-rows-to-columns-and-back-again-with-sql-aka-pivot-and-unpivot Read the docs: PIVOT: https://docs.oracle.com/en/database/oracle/oracle-database/18/dwhsg/sql-analysis-reporting-data-warehouses.html#GUID-05BB22CD-0F53-4C90-AE84-CE3F88DBD591 UNPIVOT: https://docs.oracle.com/en/database/oracle/oracle-database/18/dwhsg/sql-analysis-reporting-data-warehouses.html#GUID-B0AC9284-DDC1-4EF7-84CD-A27DF7F8DD57 Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 999 The Magic of SQL
Null: Databases for Developers #10
 
07:42
The null value represents missing or unknown information. But using it brings complications to your SQL. In this video Chris discusses how to work with null to ensure you get the correct results. Further reading: Oracle Database SQL Reference on Nulls: http://docs.oracle.com/database/122/SQLRF/Nulls.htm#SQLRF30037 Null related functions: http://docs.oracle.com/database/122/SQLRF/Single-Row-Functions.htm#SQLRF51187 Is null condition: http://docs.oracle.com/database/122/SQLRF/Null-Conditions.htm#SQLRF52152 Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2561 The Magic of SQL
Solve It with SQL: Removing Points from a Linked List
 
12:43
In this guest video, Natalka shows how you can use SQL to traverse a linked list of co-ordinates. She then demonstrates how to remove points that are not on a corner. She does this using the analytic functions lag and lead. You can find the scripts in this video in LiveSQL at: https://livesql.oracle.com/apex/livesql/file/content_D4LQ5FTUWCKRYI8QWFD6BYTNY.html For more SQL content from Natalka, head to her blog http://rdbms-insight.com/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 1537 The Magic of SQL
Why Has an Index Broken My Query?
 
06:02
Sometimes Oracle can give unexpected exceptions. This often happens when working with dates stored as strings. In this video, Chris investigates why adding an index to a varchar storing dates could cause a query to fail. He explains why this happens. Then he shows workaround to avoid this. You can download the scripts in this video from LiveSQL at: https://livesql.oracle.com/apex/livesql/file/content_CVN82PZQWQSUFYMOVKG0VI19T.html ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2886 The Magic of SQL
Schema Wars Episode 2: Master DBA Strikes Back
 
09:21
On a distant planet in a far away place... Sequella and Jason built an App to cure her brother. But it isn't working. The failures are leading to data corruption in The Database. They must take more and more risks to fix the App. Meanwhile, Master DBA and The Director are tracing the source of the corruption. Will Sequella and Jason be able to escape their clutches? ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 893 The Magic of SQL
Subqueries: Databases for Developers #11
 
07:45
In SQL you can base queries on the results of other queries. This video explains the various types of subquery and their uses, covering: - Inline views - IN & EXISTS - Common table expressions/subquery factoring/with clause - Scalar subqueries Take the course; Databases for Developers: Next Level https://blogs.oracle.com/academy/take-your-sql-skills-to-the-next-level-with-this-free-online-10-part-tutorial Further reading: About Queries and Subqueries: https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/About-Queries-and-Subqueries.html Using Subqueries: https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/Using-Subqueries.html Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 1377 The Magic of SQL
The Magic of SQL: The 4 Jacks
 
09:38
In this video Chris performs an updated version of the classic four burglars card trick using real cards and in SQL at the same time! In this trick the four Jacks are inserted throughout the deck. With a touch of magic they all end up together at the top of the deck. Stay tuned to discover for a behind the curtain look at how the SQL trick is done. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2898 The Magic of SQL
Order By & Top-N: Databases for Developers #12
 
08:14
To guarantee your queries return rows in a particular sequence, you must use an order by! This episode shows you how to do this and limit your results to the first N rows in an ordered set. Want to know more? Take the course: https://devgym.oracle.com/pls/apex/dg/class/databases-for-developers-next-level.html Order by clause documentation: https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/SELECT.html#GUID-CFA006CA-6FF1-4972-821E-6996142A51C6 Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ Videos produced by Philip Lima productions. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 970 The Magic of SQL
Merge: Databases for Developers #17
 
05:26
Sometimes when adding rows to your database need update-if-exists, insert-if-not-exists logic. Aka an upsert. You could write this as separate update and insert statements. But there is an easier way: Merge! Watch this video for an overview of how merge works. Further reading: Merge documentation: https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/MERGE.html Delete rows not in the source using merge: https://technology.amis.nl/2006/10/14/have-merge-remove-records-from-target-that-are-not-in-the-source-oracle-10g/ Take the course: https://devgym.oracle.com/pls/apex/dg/class/databases-for-developers-next-level.html Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 666 The Magic of SQL
Union, Minus & Intersect: Databases for Developers #15
 
06:52
The set operators allow you to combine many tables into one. These come in three varieties: Union Intersect Minus Watch this video to learn how they work. And find out how you can use them to compare the contents of two tables, giving you a report of the differences. Want more? https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/Set-Operators.html Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 684 The Magic of SQL
Read Consistency: Databases for Developers #18
 
09:11
If your application is successful, you'll have many people using it at the same time. But what happens when two or more people read and write to the same rows at the same time? The SQL standard defines three problems that could happen: - Dirty reads - Non-repeatable reads - Phantom reads This video explains what these are. And discusses how to manage these effects by setting the isolation level for your transaction. Take the course: https://devgym.oracle.com/pls/apex/dg/class/databases-for-developers-next-level.html Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 537 The Magic of SQL
The Magic of SQL: The Cups and Balls Trick
 
07:16
In this video Chris Saxon performs a SQL take on the classic "cups and balls" magic trick. Watch as he inserts rows into one table which then magically move to another - all with no triggers in sight! He also reveals how it's done, explaining why this is the kind of magic you don't want in your application ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 1402 The Magic of SQL
The Magic of SQL: Time Travel
 
07:55
Ever wish you could travel back in time to undo a mistake? With Oracle you can! With flashback technology you can view and recover data as it existed at some point in the past. In this video Chris Saxon shows you how. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 1339 The Magic of SQL
The Magic of SQL: Cups and Balls Behind the Curtain
 
08:20
In this video Chris takes a behind the curtain look at the trick in "The Cups and Balls Trick" episode. He shows the secret for making the multi coloured balls appear at this video - a materialized view! He goes on to discuss how he enabled this using by setting the query rewrite parameter to stale_tolerated. This episode finishes with a discussion why you may want to use this feature in your application. ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 843 The Magic of SQL
What is the Dual Table in Oracle Database? A Video Quiz
 
00:31
Dual is a special table in Oracle Database. But how much do you know about it? Find out in this video quiz! Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 778 The Magic of SQL
Columns and Data Types: Databases for Developers #2
 
04:19
Tables may be the foundation of your database. But you need something to hold them up: Columns! Choosing a data type for a column is one of the most important decisions you can make for In this episode Chris gives a run down of common data types and what you use them for. For further details on these, check the Oracle Database Data Types documentation: http://docs.oracle.com/database/122/SQLRF/Data-Types.htm#SQLRF0021 Take the Databases for Developers FREE SQL course at https://devgym.oracle.com/devgym/database-for-developers.html Subscribe for more videos on database, SQL and magic: https://www.youtube.com/c/TheMagicofSQL For daily SQL tips follow SQLDaily on Twitter: https://twitter.com/sqldaily ============================ The Magic of SQL with Chris Saxon Copyright © 2018 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 1949 The Magic of SQL
What are Primary Keys - A Video Quiz
 
00:32
Primary keys are one of the fundamental database constraints. But how much do you know about them? Take this video quiz to find out! Need help with SQL? Ask us over on AskTOM: https://asktom.oracle.com Twitter: https://twitter.com/ChrisRSaxon Daily SQL Twitter tips: https://twitter.com/SQLDaily All Things SQL blog: https://blogs.oracle.com/sql/ Take SQL Quizzes on the Oracle Dev Gym: https://devgym.oracle.com/ ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 253 The Magic of SQL
The Magic of SQL: Magical Changing Row - Behind the Curtain
 
10:24
In this episode we take a behind the curtain look at the Magical Changing Row Trick, investigating temporal validity in more detail and explaining where all the bananas came from! ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 2173 The Magic of SQL
Schema Wars Episode 3: The SQL Redemption
 
12:10
On a distant database in a far away place... Jason is captured. Master DBA and the Director prepare to fire the Death Query against NoVille and end the Underground movement. Meanwhile Sequella seeks the assistance of the legendary Coda. Can he help her rescue Jason and stop the Death Query? Find out in the exciting conclusion to the Schema Wars trilogy! ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 475 The Magic of SQL
The Dark Side of Query Optimization
 
00:34
Watch this to see why SQL tuning can lead to the dark side... ============================ The Magic of SQL with Chris Saxon Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 509 The Magic of SQL

The manageress and mirage essay examples
Lnat essay answers
Eavisa satire essay
3 way comparative essay graphic organizer
Importance of medicinal plants essay help