SQL & PL/SQL
Submitted by John Watson on Fri, 2016-08-12 03:44
Many developers find that their code fails with ORA-942, but when they test the failing statement from the SQL> prompt, it works. Why, and what can you do to fix it?
Submitted by Natalka Roshak on Mon, 2016-06-13 14:25
The CONNECT BY syntax provides a useful pseudocolumn, CONNECT_BY_ISLEAF, which identifies leaf nodes in the data: it’s 1 when a row has no further children, 0 otherwise. In this post, I’ll look at emulating this pseudocolumn using recursive WITH.
Submitted by Natalka Roshak on Fri, 2016-06-03 04:38
In my last post, I looked at using recursive WITH to implement simple recursive algorithms in SQL. One very common use of recursion is to traverse hierarchical data. I recently wrote a series of posts on hierarchical data, using Oracle’s CONNECT BY syntax and a fun example. In this post, I’ll be revisiting the same data using recursive WITH.
Submitted by Natalka Roshak on Tue, 2016-05-24 04:03
I recently had the opportunity to talk with Tom Kyte (!), and in the course of our conversation, he really made me face up to the fact that the SQL syntax I use every day is frozen in time: I’m not making much use of the analytic functions and other syntax that Oracle has introduced since 8i.
Submitted by MarcMartens on Tue, 2015-02-24 06:41
Why publishing this under SQL instead of RDBMS Server?
The necessaty to create supporting indexes for foreign keys has been explained in other articles.
However writing a foolproof query to identify missing FK indexes is not so straightforward as it might look. I used to do it PLSQL, but this has proven not to scale very well and taking quite some elapsed time and system resources in databases with many thousands of tables. The blog entry is about the challenge to get the job done with a well performing SQL statement.
Submitted by John Watson on Sat, 2015-02-21 08:12
Another example of what I think of as "the self-tuning database". Setting optimizer_dynamic_sampling=11 can fix many performance problems, without the DBA needing to use his brain at all.
Submitted by John Watson on Sun, 2015-02-08 07:48
Excellent exposition of a very effective SQL tuning metodology
Submitted by atif_crazyoftech on Thu, 2015-02-05 13:06
The Oracle external tables feature allows us to access data in external sources as if it is a table in the database.
External tables are read-only.
No data manipulation language (DML) operations is allowed on an external table.
An external table does not describe any data that is stored in the database.
Submitted by Lalit Kumar B on Fri, 2014-09-05 05:27
It's a lazy Friday and I saw an interesting question in Stack Overflow about "Why are there two “null” keywords in Oracle's v$reserved_words view?" And I spent next 2 hours digging into knowing the reason. Here are my findings:
We need to understand how to interpret the view v$reserved _words. To determine whether a particular keyword is reserved in any way, check the RESERVED, RES_TYPE, RES_ATTR, and RES_SEMI columns.
Submitted by rleishman on Wed, 2014-07-02 06:04
After more than 20 years of working with Oracle databases, I have recently found myself using SQL Server for the very first time. Until now, I have been a passive observer in the My-Database-Is-Better-Than-Yours wars, so it’s a pleasant change to be able to finally contribute.