More about analytic functions, visit http://www.learn-with-video-tutorials.com Oracle Analytic Functions and Over By Partition clause enable calculating cumulative and moving aggregates returning multiple rows for each group.
Views: 30671 Learn with video tutorials
This Video series will explain partitioning and its use cases referencing real project examples from different domain. It will explain what when and why of partitioning in a simple but elaborate manner. This is the 1st video which explains why partitioning is required and what are the advantages we gain from it. The following videos will explain when should we do it and how.
Views: 24553 Tech Coach
In this tutorial, you'll learn will learn how to use with clause PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural extension for SQL and the Oracle relational database. PL/SQL is available in Oracle Database (since version 7), TimesTen in-memory database (since version 11.2.1), and IBM DB2 (since version 9.7). Oracle Corporation usually extends PL/SQL functionality with each successive release of the Oracle Database. PL/SQL includes procedural language elements such as conditions and loops. It allows declaration of constants and variables, procedures and functions, types and variables of those types, and triggers. It can handle exceptions (runtime errors). Arrays are supported involving the use of PL/SQL collections. Implementations from version 8 of Oracle Database onwards have included features associated with object-orientation. One can create PL/SQL units such as procedures, functions, packages, types, and triggers, which are stored in the database for reuse by applications that use any of the Oracle Database programmatic interfaces. PL/SQL works analogously to the embedded procedural languages associated with other relational databases. For example, Sybase ASE and Microsoft SQL Server have Transact-SQL, PostgreSQL has PL/pgSQL (which emulates PL/SQL to an extent), and IBM DB2 includes SQL Procedural Language, which conforms to the ISO SQL’s SQL/PSM standard. The designers of PL/SQL modeled its syntax on that of Ada. Both Ada and PL/SQL have Pascal as a common ancestor, and so PL/SQL also resembles Pascal in several aspects. However, the structure of a PL/SQL package does not resemble the basic Object Pascal program structure as implemented by a Borland Delphi or Free Pascal unit. Programmers can define public and private global data-types, constants and static variables in a PL/SQL package. PL/SQL also allows for the definition of classes and instantiating these as objects in PL/SQL code. This resembles usage in object-oriented programming languages like Object Pascal, C++ and Java. PL/SQL refers to a class as an "Abstract Data Type" (ADT) or "User Defined Type" (UDT), and defines it as an Oracle SQL data-type as opposed to a PL/SQL user-defined type, allowing its use in both the Oracle SQL Engine and the Oracle PL/SQL engine. The constructor and methods of an Abstract Data Type are written in PL/SQL. The resulting Abstract Data Type can operate as an object class in PL/SQL. Such objects can also persist as column values in Oracle database tables. PL/SQL is fundamentally distinct from Transact-SQL, despite superficial similarities. Porting code from one to the other usually involves non-trivial work, not only due to the differences in the feature sets of the two languages, but also due to the very significant differences in the way Oracle and SQL Server deal with concurrency and locking. There are software tools available that claim to facilitate porting including Oracle Translation Scratch Editor, CEITON MSSQL/Oracle Compiler  and SwisSQL. The StepSqlite product is a PL/SQL compiler for the popular small database SQLite. PL/SQL Program Unit A PL/SQL program unit is one of the following: PL/SQL anonymous block, procedure, function, package specification, package body, trigger, type specification, type body, library. Program units are the PL/SQL source code that is compiled, developed and ultimately executed on the database. The basic unit of a PL/SQL source program is the block, which groups together related declarations and statements. A PL/SQL block is defined by the keywords DECLARE, BEGIN, EXCEPTION, and END. These keywords divide the block into a declarative part, an executable part, and an exception-handling part. The declaration section is optional and may be used to define and initialize constants and variables. If a variable is not initialized then it defaults to NULL value. The optional exception-handling part is used to handle run time errors. Only the executable part is required. A block can have a label. Package Packages are groups of conceptually linked functions, procedures, variables, PL/SQL table and record TYPE statements, constants, cursors etc. The use of packages promotes re-use of code. Packages are composed of the package specification and an optional package body. The specification is the interface to the application; it declares the types, variables, constants, exceptions, cursors, and subprograms available. The body fully defines cursors and subprograms, and so implements the specification. Two advantages of packages are: Modular approach, encapsulation/hiding of business logic, security, performance improvement, re-usability. They support object-oriented programming features like function overloading and encapsulation. Using package variables one can declare session level (scoped) variables, since variables declared in the package specification have a session scope.
Views: 14008 radhikaravikumar
This is the 2nd video from " Partitioning in Oracle " series, It explains how oracle stores and manages data. What is single Block IO and Multi Block IO ? Why full table scan is better than index access in few cases. The video is very elaborate, I have tried my level best to keep it as simple as possible
Views: 10315 Tech Coach
Hello Friends In this video i'm going to demonstrate you about ORACLE PARTITIONS, How many types of table partition in the oracle. i'm discus with you in this video, For more detail please visit on the www.ocptechnology.com
Views: 6414 OCP Technology
Use list partitioning when you require explicit control over how rows map to partitions. You can specify a list of discrete values for the partitioning column in the description for each partition. This is different from range partitioning, where a range of values is associated with a partition, and from hash partitioning, where the user has no control of the row to partition mapping. List partitioning allows unordered and unrelated sets of data to be grouped and organized together very naturally The following example creates a table with list partitioning create table customers (custcode number(5), Name varchar2(20), Addr varchar2(10,2), City varchar2(20), Bal number(10,2)) Partition by list (city), Partition north_India values (‘DELHI’,’CHANDIGARH’), Partition east_India values (‘KOLKOTA’,’PATNA’), Partition south_India values (‘HYDERABAD’,’BANGALORE’,’CHENNAI’), Partition west India values (‘BOMBAY’,’GOA’); If a row is inserted in the above table then oracle maps the value of city column and whichever partition list matches the city column the row is stored in that partition.
Views: 712 Md Arshad
This video tutorial talks about the frequently asked oracle sql interview question of changing rows to the column. Based on the given scenario, we are asked to change the presentation of data in a table with 3 rows and 2 column to 3 columns and 2 rows. Decode Function in oracle https://youtu.be/YUAjPMjqMws Pivot and unpivot in oracle https://youtu.be/6s0DI1YcWIM
Views: 15793 Kishan Mashru
Oracle Hints Tutorial for improving performance APPEND PARALLEL JOIN INDEX NO_INDEX SELECT /*+ FIRST_ROWS(10) */ * FROM emp WHERE deptno = 10; SELECT /*+ ALL_ROWS */ * FROM emp WHERE deptno = 10; SELECT /*+ NO_INDEX(emp emp_dept_idx) */ * FROM emp, dept WHERE emp.deptno = dept.deptno; SELECT /*+ INDEX(e,emp_dept_idx) */ * FROM emp e WHERE e.deptno = 10; -- SELECT /*+ INDEX(scott.emp,emp_dept_idx) */ * FROM scott.emp; SELECT /*+ AND_EQUAL(e,emp_dept_idx) */ * FROM emp e; SELECT /*+ INDEX_JOIN(e,emp_dept_idx) */ * FROM emp e; SELECT /*+ PARALLEL_INDEX(e,emp_dept_idx , 8) */ * FROM emp e; SELECT /*+ LEADING (dept) */ * FROM emp, dept WHERE emp.deptno = dept.deptno; SELECT /*+ PARALLEL(8) CACHE (e) FULL (e) */ * FROM emp e ; SELECT /*+ PARALLEL FULL (e) */ * FROM emp e ; SELECT /*+ PARALLEL USE_MERGE (emp dept) */ * FROM emp, dept WHERE emp.deptno = dept.deptno; -- SORT Merge Join SELECT /*+ PARALLEL USE_HASH (emp dept) */ * FROM emp, dept WHERE emp.deptno = dept.deptno; -- Hash Join SELECT /*+ PARALLEL */ * FROM emp e ; INSERT /*+ APPEND */ INTO mytmp select /*+ CACHE (e) */ *from emp e; commit;
Views: 7571 TechLake
Oracle Analytic Functions and Over By Partition clause enable calculating cumulative and moving aggregates returning multiple rows for each group
Views: 206 Technical Training knowledge Transfer
over partition by in sql server 2008 sql server over clause partition partition by clause in sql server 2008 over partition by clause in sql In this video we will discuss the power and use of Over clause in SQL Server. The OVER clause combined with PARTITION BY is used to break up data into partitions. Syntax : function (...) OVER (PARTITION BY col1, Col2, ...) The specified function operates for each partition. For example : COUNT(Gender) OVER (PARTITION BY Gender) will partition the data by GENDER i.e there will 2 partitions (Male and Female) and then the COUNT() function is applied over each partition. Any of the following functions can be used. Please note this is not the complete list. COUNT(), AVG(), SUM(), MIN(), MAX(), ROW_NUMBER(), RANK(), DENSE_RANK() etc. Example : SQl Script to create Employees table Create Table Employees ( Id int primary key, Name nvarchar(50), Gender nvarchar(10), Salary int ) Go Insert Into Employees Values (1, 'Mark', 'Male', 5000) Insert Into Employees Values (2, 'John', 'Male', 4500) Insert Into Employees Values (3, 'Pam', 'Female', 5500) Insert Into Employees Values (4, 'Sara', 'Female', 4000) Insert Into Employees Values (5, 'Todd', 'Male', 3500) Insert Into Employees Values (6, 'Mary', 'Female', 5000) Insert Into Employees Values (7, 'Ben', 'Male', 6500) Insert Into Employees Values (8, 'Jodi', 'Female', 7000) Insert Into Employees Values (9, 'Tom', 'Male', 5500) Insert Into Employees Values (10, 'Ron', 'Male', 5000) Go Write a query to retrieve total count of employees by Gender. Also in the result we want Average, Minimum and Maximum salary by Gender. This can be very easily achieved using a simple GROUP BY query as show below. SELECT Gender, COUNT(*) AS GenderTotal, AVG(Salary) AS AvgSal, MIN(Salary) AS MinSal, MAX(Salary) AS MaxSal FROM Employees GROUP BY Gender What if we want non-aggregated values (like employee Name and Salary) in result set along with aggregated values You cannot include non-aggregated columns in the GROUP BY query. SELECT Name, Salary, Gender, COUNT(*) AS GenderTotal, AVG(Salary) AS AvgSal, MIN(Salary) AS MinSal, MAX(Salary) AS MaxSal FROM Employees GROUP BY Gender The above query will result in the following error : Column 'Employees.Name' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause One way to achieve this is by including the aggregations in a subquery and then JOINING it with the main query as shown in the example below. Look at the amount of T-SQL code we have to write. SELECT Name, Salary, Employees.Gender, Genders.GenderTotals, Genders.AvgSal, Genders.MinSal, Genders.MaxSal FROM Employees INNER JOIN (SELECT Gender, COUNT(*) AS GenderTotals, AVG(Salary) AS AvgSal, MIN(Salary) AS MinSal, MAX(Salary) AS MaxSal FROM Employees GROUP BY Gender) AS Genders ON Genders.Gender = Employees.Gender Better way of doing this is by using the OVER clause combined with PARTITION BY SELECT Name, Salary, Gender, COUNT(Gender) OVER(PARTITION BY Gender) AS GenderTotals, AVG(Salary) OVER(PARTITION BY Gender) AS AvgSal, MIN(Salary) OVER(PARTITION BY Gender) AS MinSal, MAX(Salary) OVER(PARTITION BY Gender) AS MaxSal FROM Employees Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/over-clause-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/over-clause-in-sql-server_29.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 88029 kudvenkat
In this tutorial video we will learn how to use PARTITION BY clause in Analytic Functions Oracle SQL
Views: 1873 Spod ssppoodd
Join discussion: http://www.techtud.com/video-lecture/understanding-group-clause-sql IMPORTANT LINKS: 1) Official Website: http://www.techtud.com/ 2) Virtual GATE: http://virtualgate.in/login/index.php Both of the above mentioned platforms are COMPLETELY FREE, so feel free to Explore, Learn, Practice & Share! Our Social Media Links: Facebook Page: https://www.facebook.com/techtuduniversity Facebook Group: https://www.facebook.com/groups/virtualgate Google+ Page: https://plus.google.com/+techtud/posts Last but not the least, SUBSCRIBE our YouTube channel to stay updated about the regularly uploaded new videos.
Views: 70839 Techtud
This video clip, on the PARTITION BY Clause used with analytic functions, is taken from my www.pluralsight.com course "Advanced SQL Queries in Oracle and SQL Server". Click here to learn more about this course: http://www.pluralsight.com/courses/adv-sql-queries-oracle-sql-server?utm_source=youtube&utm_medium=video&utm_campaign=authordemo.
Views: 5423 sheepsqueezersYT
Partitioning enhances the performance, manageability, and availability of a wide variety of applications and helps reduce the total cost of ownership for storing large amounts of data. Partitioning allows tables, indexes, and index-organized tables to be subdivided into smaller pieces, enabling these database objects to be managed and accessed at a finer level of granularity. Oracle provides a rich variety of partitioning strategies and extensions to address every business requirement. Moreover, since it is entirely transparent, partitioning can be applied to almost any application without the need for potentially expensive and time consuming application changes. Partitioning allows a table, index, or index-organized table to be subdivided into smaller pieces, where each piece of such a database object is called a partition. Each partition has its own name, and may optionally have its own storage characteristics. From the perspective of a database administrator, a partitioned object has multiple pieces that can be managed either collectively or individually. This gives the administrator considerable flexibility in managing partitioned objects. However, from the perspective of the application, a partitioned table is identical to a non-partitioned table; no modifications are necessary when accessing a partitioned table using SQL queries and DML statements. Partitioning Key ======================== Each row in a partitioned table is unambiguously assigned to a single partition. The partitioning key is comprised of one or more columns that determine the partition where each row will be stored. Oracle automatically directs insert, update, and delete operations to the appropriate partition through the use of the partitioning key. When to Partition a Table ========================== Here are some suggestions for when to partition a table: Tables greater than 2 GB should always be considered as candidates for partitioning. Tables containing historical data, in which new data is added into the newest partition. A typical example is a historical table where only the current month's data is updatable and the other 11 months are read only. When the contents of a table need to be distributed across different types of storage devices. When to Partition an Index ============================= Here are some suggestions for when to consider partitioning an index: Avoid rebuilding the entire index when data is removed. Perform maintenance on parts of the data without invalidating the entire index. Reduce the impact of index skew caused by an index on a column with a monotonically increasing value. Partitioned Index-Organized Tables =================================== Partitioned index-organized tables are very useful for providing improved performance, manageability, and availability for index-organized tables. For partitioning an index-organized table: ============================================ Partition columns must be a subset of the primary key columns Secondary indexes can be partitioned (both locally and globally) OVERFLOW data segments are always equi-partitioned with the table partitions See Also: Oracle Database Concepts for more information about index-organized tables System Partitioning System partitioning enables application-controlled partitioning without having the database controlling the data placement. The database simply provides the ability to break down a table into partitions without knowing what the individual partitions are going to be used for. All aspects of partitioning have to be controlled by the application. For example, an insertion into a system partitioned table without the explicit specification of a partition will fail. System partitioning provides the well-known benefits of partitioning (scalability, availability, and manageability), but the partitioning and actual data placement are controlled by the application. See Also: Oracle Database Data Cartridge Developer's Guide for more information about system partitioning Partitioning for Information Lifecycle Management Information Lifecycle Management (ILM) is concerned with managing data during its lifetime. Partitioning plays a key role in ILM because it enables groups of data (that is, partitions) to be distributed across different types of storage devices and managed individually.
Views: 7204 Md Arshad
Now a days enterprises run databases of hundred of Gigabytes in size. These databases are known as Very Large Databases (VLDB). From Oracle Ver. 8.0 Oracle has provided the feature of table partitioning i.e. you can partition a table according to some criteria . For example you have a SALES table with the following structure Suppose this table contains millions of records, but all the records belong to four years only i.e. 1991, 1992, 1993 and 1994. And most of the time you are concerned about only one year i.e. you give queries like the following select sum(amt) from sales where year=1991; select product,sum(amt) from sales where year=1992 Group by product; Now whenever you give queries like this Oracle will search the whole table. If you partition this table according to year, then the performance is improve since oracle will scan only a single partition instead of whole table. This type of partitioning is useful when dealing with data that has logical ranges into which it can be distributed; for example, value of year. Performance is best when the data evenly distributes across the range
Views: 1899 Md Arshad
Explanation and implementation of Oracle 10g VARRAY, Nested Table and Partitioned Table.
Views: 5257 ITLecture
http://bit.ly/oracle-sql-course | Get the complete course today. Learn Oracle SQL : The Hierarchical Query Clause: In this video, I show you how to use the Hierarchical Query Clause in Oracle SQL to build a basic hierarchical query. This is an excerpt of the course "The Ultimate Oracle SQL Course" which you can get at a heavily discounted price here: http://bit.ly/oracle-sql-course ================ You can find additional Oracle SQL related articles and educational content in my blog here: http://standout-dev.com/
Views: 7926 Oracle SQL
https://www.databasestar.com/oracle-listagg/ The Oracle LISTAGG function allows you to aggregate or combine string values from multiple rows into a single row. For example, it turns this data: FIRST_NAME Adam Brad Carrie Into this data: FIRST_NAME Adam, Brad, Carrie The same data is shown, but it’s in one row and not multiple. It’s a valuable string manipulation function, and once you know what it is and how it works, you’ll be able to use it in your queries as needed. So what does it look like? The function is: LISTAGG ( measure_expr [, delimiter]) WITHIN GROUP (order_by_clause) [OVER query_partition_clause] These parameters are: measure_expr: This is a column or expression that you want to concatenate the values of. In the example above, it was the first_name column. Mandatory. delimiter: This is the character between each of the measure_expr values. Optional, the default is a comma. order_by_clause: This is the order that the values from the measure_expr are listed. Mandatory. query_partition_clause: This allows you to use LISTAGG as an analytic function, allowing you to show LISTAGG in groups for different rows. One thing to be aware of is that the output of the Oracle LISTAGG function is limited to 4,000 bytes. If you get more than this, you’ll receive an error. The most common way around this that I’ve seen is to write a custom function and use a CLOB. Watch the video to find out more and see some examples. For more information about the Oracle LISTAGG function, including all of the SQL shown in this video and the examples, read the related article here: https://www.databasestar.com/oracle-listagg/
Views: 2795 Database Star
This video explains analytical functions and how they are implemented in real projects. Analytical functions are somewhat similar to aggregate functions,but they offer much more. Why use analytical function ? They allow you to write fast and concise queries which otherwise will involve self join and long processing times They allow you to perform aggregate functions independently on sets of partitions. You can access values from previous rows in current row and you can restrict the window on which you want to apply this analytical function. I have given additional practice exercises along with the dataset so that you can comfortably work with analytical functions. You can find the sample problems along with dataset in the below link. http://www.internshipsfromhome.com/oracle-analytical-functions-ddl-and-dml/
Views: 20223 Tech Coach
In this video i'm discus with you how to create hash partition in oracle step by step. #hash #partition #oracletutorial #oracle website:- www.ocptechnology.com #oracle12c
Views: 3085 OCP Technology
exchange Partition , Move partition in oracle Possible operations with partitions SQL Tutorial SQL Tutorial for beginners PLSQL Tutorial PLSQL Tutorial for beginners PL/SQL Tutorial PL SQL Tutorial PL SQL Tutorial for beginners PL/SQL Tutorial for beginners Oracle SQL Tutorial Add Drop Rename Split Move ( Moving from Tablespace to tablespace) Exchange (Table to Table(non Partitioned table)) not partitioned only exchanging data (p)
Views: 1351 TechLake
This video demonstrates examples on how to find and delete duplicate records from a table. The video gives simple and easy to understand examples on finding duplicate records from a table using group by and having clause and row_number function. It also shows the ways in which duplicates can be deleted very efficiently using the rowid of that record. You can get the code from our website http://oracleplsqlblog.com/FullBlog/FullBlog/21
Views: 10043 Kishan Mashru
The Video Explains the difference between Local Partitioned Indexes(Prefixed vs Non Prefixed Indexes). and Global Partitioned Index along with the challenges in maintaining Global partitioned Indexes when the underlying tables partitioned is dropped/truncated/Merged/Moved. Local Partitioned Index Shares the same boundaries as the table and are in the same number as table partitions they are widely used in DSS and DWH systems. While Global Partitioned Index are predominantly used in OLTP systems
Views: 6721 Tech Coach
This video is for beginners who have never worked with SQL Developer, and we are going to teach how to begin writing queries. So the queries we are going to start with are queries when we give the database an expression and it will return back some kind of value. The most common keyword you are going to need to know for Oracle is SELECT. SELECT is the command we use to get data from the database. Even though we have not really put any data in our database, we can still use the SELECT statement to get data. That's because the database is capable of doing more than just creating tables and retrieving data from tables. So our first goal is to essentially write a Hello World, which just displays the text hello world to us. A good place to start is with: SELECT 'Hello World' This would actually work for many database management systems, but when you run it you will get an error. This actually doesn't work with Oracle, it will tell us we always need the FROM keyword. To get around this, there is a magical table called DUAL. We can put anything we want to SELECT and then say FROM DUAL and it will work. SELECT 'Hello World' FROM DUAL We can also do math: SELECT 1+1 FROM DUAL And we can run even run functions: SELECT SYSTIMESTAMP FROM DUAL To put all of this together, you can grab all of this data at the same time using commas to separate different columns from our generated table: SELECT 'Hello World', 1+1, SYSTIMESTAMP FROM DUAL Support me on Patreon: http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 28358 Caleb Curry
List Partition with examples. What is LIST Partition in Oracle SQL Tutorial SQL Tutorial for beginners PLSQL Tutorial PLSQL Tutorial for beginners PL/SQL Tutorial PL SQL Tutorial PL SQL Tutorial for beginners PL/SQL Tutorial for beginners Oracle SQL Tutorial
Views: 876 TechLake
sql server row_number example sql server row number by partition sql server row_number over partition by order by In this video we will discuss Row_Number function in SQL Server. This is continuation to Part 108. Please watch Part 108 from SQL Server tutorial before proceeding. Row_Number function Introduced in SQL Server 2005 Returns the sequential number of a row starting at 1 ORDER BY clause is required PARTITION BY clause is optional When the data is partitioned, row number is reset to 1 when the partition changes Syntax : ROW_NUMBER() OVER (ORDER BY Col1, Col2) Row_Number function without PARTITION BY : In this example, data is not partitioned, so ROW_NUMBER will provide a consecutive numbering for all the rows in the table based on the order of rows imposed by the ORDER BY clause. SELECT Name, Gender, Salary, ROW_NUMBER() OVER (ORDER BY Gender) AS RowNumber FROM Employees Please note : If ORDER BY clause is not specified you will get the following error The function 'ROW_NUMBER' must have an OVER clause with ORDER BY Row_Number function with PARTITION BY : In this example, data is partitioned by Gender, so ROW_NUMBER will provide a consecutive numbering only for the rows with in a parttion. When the partition changes the row number is reset to 1. SELECT Name, Gender, Salary, ROW_NUMBER() OVER (PARTITION BY Gender ORDER BY Gender) AS RowNumber FROM Employees Use case for Row_Number function : Deleting all duplicate rows except one from a sql server table. Discussed in detail in Part 4 of SQL Server Interview Questions and Answers video series. Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/rownumber-function-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/rownumber-function-in-sql-server_30.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 83005 kudvenkat
Tom Kyte introduces the new partitioning improvements in Oracle Database 12c, followed by a demo of global index maintenance. For more information: "Asynchronous Global Index Maintenance for Dropping and Truncating Partitions" http://www.oracle.com/pls/topic/lookup?ctx=db121&id=VLDBG14107 "Changes for Very Large Databases and Partitioning in Oracle Database 12c Release 1" http://www.oracle.com/pls/topic/lookup?ctx=db121&id=VLDBG14100 "ALTER INDEX COALESCE Clause" http://www.oracle.com/pls/topic/lookup?ctx=db121&id=SQLRF52782 "DBMS_PART.CLEANUP_GIDX Procedure" http://www.oracle.com/pls/topic/lookup?ctx=db121&id=ARPLS74409
Views: 13494 OracleDBVision
In this video we cover in much more detail the improvement in performance that can be achieved by using partitioning. MS SQL server databases can scale well using this feature. We cover how partitioning a table gives similar performance as a single table with a clustered index, we then explore how adding NC index improve performance of the heap table as well as the partitioned table.
Views: 18940 Jayanth Kurup
This video shows you the use of partition wise join in parallel processing. Copyright © 2012 Oracle and/or its affiliates. Oracle® is a registered trademark of Oracle and/or its affiliates. All rights reserved. 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 of merchantability, fitness for a particular purpose, and non-infringement.
Views: 2497 Oracle Learning Library
Views: 198615 .NET Interview Preparation videos
This course has been designed to impart the in-depth knowledge about the partitioning types and architecture in the Oracle RDBMS. For more information on this course, please visit https://www.koenig-solutions.com/oracle-database-12-c-implement-partitioning-training.aspx
Views: 88 Koenig Solutions
This video demonstrates how to write a Merge Statement in oracle sql, how it is useful in doing a conditional update or delete or both of them when the condition between the target table and source table is evaluated to true, and how we can insert the record into the target table when condition is evaluated to false. The video also shows the use of UPDATE, DELETE and INSERT with Merge, and also the various possible ways to use a Merge statement!!!
Views: 9109 Kishan Mashru
In this lesson, an introduction about Oracle Query Optimization. Partitioned Tables and Indexes. How to see plan of query. Monitoring plan of queries. SQL Plan
Views: 48 Mkrtich Pudeyan
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/05/part-1-how-to-find-nth-highest-salary_17.html This is a very common SQL Server Interview Question. There are several ways of finding the nth highest salary. By the end of this video, we will be able to answer all the following questions as well. How to find nth highest salary in SQL Server using a Sub-Query How to find nth highest salary in SQL Server using a CTE How to find the 2nd, 3rd or 15th highest salary Let's use the following Employees table for this demo Use the following script to create Employees table Create table Employees ( ID int primary key identity, FirstName nvarchar(50), LastName nvarchar(50), Gender nvarchar(50), Salary int ) GO Insert into Employees values ('Ben', 'Hoskins', 'Male', 70000) Insert into Employees values ('Mark', 'Hastings', 'Male', 60000) Insert into Employees values ('Steve', 'Pound', 'Male', 45000) Insert into Employees values ('Ben', 'Hoskins', 'Male', 70000) Insert into Employees values ('Philip', 'Hastings', 'Male', 45000) Insert into Employees values ('Mary', 'Lambeth', 'Female', 30000) Insert into Employees values ('Valarie', 'Vikings', 'Female', 35000) Insert into Employees values ('John', 'Stanmore', 'Male', 80000) GO To find the highest salary it is straight forward. We can simply use the Max() function as shown below. Select Max(Salary) from Employees To get the second highest salary use a sub query along with Max() function as shown below. Select Max(Salary) from Employees where Salary [ (Select Max(Salary) from Employees) To find nth highest salary using Sub-Query SELECT TOP 1 SALARY FROM ( SELECT DISTINCT TOP N SALARY FROM EMPLOYEES ORDER BY SALARY DESC ) RESULT ORDER BY SALARY To find nth highest salary using CTE WITH RESULT AS ( SELECT SALARY, DENSE_RANK() OVER (ORDER BY SALARY DESC) AS DENSERANK FROM EMPLOYEES ) SELECT TOP 1 SALARY FROM RESULT WHERE DENSERANK = N To find 2nd highest salary we can use any of the above queries. Simple replace N with 2. Similarly, to find 3rd highest salary, simple replace N with 3. Please Note: On many of the websites, you may have seen that, the following query can be used to get the nth highest salary. The below query will only work if there are no duplicates. WITH RESULT AS ( SELECT SALARY, ROW_NUMBER() OVER (ORDER BY SALARY DESC) AS ROWNUMBER FROM EMPLOYEES ) SELECT SALARY FROM RESULT WHERE ROWNUMBER = 3
Views: 918831 kudvenkat
Learn Table Auditing using DML Triggers in Oracle Database and Increase the level of security by keep an eye on user tempering your table data. ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/table-auditing Previous Tutorial ► DML Triggers with Examples https://youtu.be/-OR7zLzCh_I ► Select-Into Statement: https://youtu.be/F5eMJhwmCQs ►Sysdate Blog : http://bit.ly/sysdate-in-oracle-by-rebellionrider ------------------------------------------------------------------------- ►►►Let's Get Free Uber Cab◄◄◄ Use Referral Code UberRebellionRider and get $20 free for your first ride. ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider https://www.facebook.com/imthebhardwaj http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ http://rebellionrider.tumblr.com/ http://www.pinterest.com/rebellionrider/ You can also Email me at for E-mail address please check About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 72138 Manish Sharma