Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Databases More Advanced PL/SQL Programing 1.

Similar presentations


Presentation on theme: "Advanced Databases More Advanced PL/SQL Programing 1."— Presentation transcript:

1 Advanced Databases More Advanced PL/SQL Programing 1

2 Advanced Databases Agenda Indexes –Not PL/SQL but a RBMS performance enhancement PL/SQL –Functions –Cursor For Loops 2

3 Advanced Databases Indexes Database object which provides capability to speed up the search process. Guide to Oracle 10g 3 IDColor 1Red 2Blue 3Red 4 5Blue 6Green 7Red 8 ColorID’s Blue2, 5 Green6 Red1, 3, 4, 7, 8 Table Table Index on Color Impacts on: SELECT? INSERT? UPDATE? DELETE?

4 Advanced Databases Indexes in SQL Guide to Oracle 10g 4

5 Advanced Databases Why not Index Everything? Every Index makes one of those “index tables” If you have 10 indexes on a table, an INSERT, DELETE or UPDATE needs to write to that table + the 10 index tables. Indexing speeds up reads at the expense of writes. Guide to Oracle 10g 5

6 Advanced Databases Functions Functions are stored procedures which return a value. Functions are not executed like stored procedures. Instead, they are called from within SQL or PL/SQL. SELECT myfunction() … Guide to Oracle 10g 6

7 Advanced Databases Functions Guide to Oracle 10g 7

8 Advanced Databases Cursor For Loops Easier to implement cursors. Simplified – no open, close, fetch or exit conditions! If you need to use a cursor, use these. Guide to Oracle 10g 8

9 Advanced Databases Questions 9


Download ppt "Advanced Databases More Advanced PL/SQL Programing 1."

Similar presentations


Ads by Google