SQL & PL/SQL

SQL and PL/SQL Articles

To find free space in oracle DB

articles: 

SELECT tablespace_name ,round(TOTAL_SIZE,2) ,round(TOTAL_SIZE-FREE_SIZE,2) ,
round(FREE_SIZE,2)
FROM (SELECT tablespace_name,(SELECT SUM(BYTES)/1024/1024/1024 FROM DBA_DATA_FILES b WHERE b.TABLESPACE_NAME=a.TABLESPACE_NAME)TOTAL_SIZE,
SUM(bytes)/1024/1024/1024
FREE_SIZE
FROM DBA_FREE_SPACE a GROUP BY tablespace_name) order by 1;

Tablespace Capacity Planning Report

articles: 

Tablespace Capacity Planning Report
Author JP Vijaykumar
Written Sep 14 2017
Modified Mar 08 2019
***************************************************************************************************************
This script is provided for enducational purpose only.
The readers are advised to make necessary changes to the script as may be required for their use in their repective environments.
Pls test this script thoroughly in a lower environment, before using in any production db.

Apriori Algorithm in pl/sql

articles: 

********************************************************************************
APRIORI ALGORITHM
********************************************************************************
Modified March 08 2019

Linear Regression Algorithm in pl/sql

articles: 

********************************************************************************
--LINEAR REGRESSION ALGORITHM IN PL/SQL
--------------------------------------------------------------------------------
Modified Mar 8th 2019
Using Linear Regression algorithm, find the weight of a studen, whose is 71 inches tall.
Given the height and weight of 8 students.

NAIVE BAYES ALGORITHM WITH SQL & PL/SQL

articles: 

--NAIVE BAYES ALGORITHM WITH SQL & PL/SQL
---------------------------------------------------------------------------------
--Written JP Vijaykumar
--Date Jan 4th 2019

--This script is provided for educational purpose only.
--The readers are advised to make necessary changes as may be required for their use.

--I love data mining algorithms for their complexity and number crunching toughest logic.
--Academically, I want to generate Naive Bayes algorythm in pl/sql to predict the outcome.

Sending Email from PLSQL from Gmail

articles: 

How to send Email in Oracle using Gmail.
Email sending by using Oracle through Gmail:

BEGIN EMAIL_GMAIL.SEND ('shabbier.sa@gmail.com','shabbier.sa@gmail.com','Your email subject','Emaisaaasdasal Message body'); END;

Tuning with equivalent SQLs - a little challenge

articles: 

I am fascinated by what I call "equal SQL": statements that are equivalent, in that they deliver the same result but may have hugely different performance characteristics. Here's a little case study.

Is row-by-row processing really slow-by-slow? Emphatically: YES

articles: 

Developers who come to Oracle with a background in procedural languages sometimes do not understand how efficient SQL's set oriented processing can be. This little demonstration should convince them: never use PL/SQL when SQL will do.

How to change column order when using SELECT *

articles: 

We all know that using SELECT * is bad programming. One reason is that you cannot control the order in which columns are returned. Well, you can in release 12c.

Pages

Subscribe to RSS - SQL & PL/SQL