MouthShut.com Would Like to Send You Push Notifications. Notification may includes alerts, activities & updates.

OTP Verification

Enter 4-digit code
For Business
×
transparentImg
Upload Photo
Oracle8i Image

MouthShut Score

100%
5 

Features & Functionality:

Ease of use:

Help & Support:

Look & Feel:

Value for Money:

×
Supported file formats : jpg, png, and jpeg


Cancel

I feel this review is:

Fake
Genuine

To justify genuineness of your review kindly attach purchase proof
No File Selected

Oracle8i Reviews

navinputkiMouthShut Verified Member
India
ORACLE THE MIRACLE
Aug 01, 2020 08:46 AM 294 Views

I AM THE USER AND AND I LOVE TO WORK ON THIS SOFTWARE THIS SOFTWARE IS A UNIQUE FEATURES AND I ALSO LIKE THEIR SECURITY AND PRIVACY FEATURES THIS IS A TRUSTED BRAND AND AFTER USING THIS SOFTWARE I LOVE IT AND ALSO GIVING THE IDEAS TO OTHER TO USE AND TRY THE GIVEN FEATURES OF THEIR SOFTWARE I KNOW THIS KIND OF CREATION ALWAYS COME AFTER HARD WORK SO I THANKS TO THE EMPLOYEES THAT MAKE THIS KIND OF SOFTWARE FOR US


Trace with TKprof
Feb 05, 2004 06:35 PM 4844 Views

I find this opportunity to introduce myself to the World of Oracle. Friends those of you who are taking interest in the performance analysis and like working with Oracle SQL interface and not using the third party tools please do explore the power of Oracle and use the inbuilt features given by Oracle as TKPROF.


The TKPROF program converts Oracle trace files into a more readable form. If you have a problem query you can user TKPROF to get more information. To get the most out of the utility you must enable timed statistics by setting the init.ora parameter or performing the following command:


ALTER SYSTEM SET TIMED_STATISTICS = TRUE;


If a suitable plan table is not present one can be created by doing the fooling as the SYS user:


@ORACLE_HOME\rdbms\admin\utlxplan.sql


CREATE PUBLIC SYNONYM PLAN_TABLE FOR SYS.PLAN_TABLE;


GRANT SELECT, INSERT, UPDATE, DELETE ON SYS.PLAN_TABLE TO PUBLIC;


With this done we can trace a statement:


ALTER SESSION SET SQL_TRACE = TRUE;


SELECT COUNT(*)


FROM dual;


ALTER SESSION SET SQL_TRACE = FALSE;


The resulting trace file will be located in the USER_DUMP_DEST directory. This can then be interpreted using TKPROF at the command prompt as follows:


TKPROF <trace-file> <output-file> explain=user/password@service table=sys.plan_table


The Tkprof utility usage can be enhanced by parameters such as


SYS = YES/NO : This option allows the user to request that the recursive SQL statements (issues by the SYS user) not be displayed in the output. The default is YES. Recursive SQl usually includes internal calls and any table maintenance, such as adding an extent to a table during an insert.


RECORD = filename : This option produces a file of all the user's SQL statements.


INSERT = filename : This option creates a script to create a table and store the TRACE file statistics for each SQL statement traced.


SORT = parameters : This is the order in which to disp[lay the statements in the output. There are about 20 options in all for sorting the output.


The sample command usage for the readers is below :


tkprof ora_0076.trc Atul.txt explain=system/manager sort=(FCHCPU, EXECPU, PRSCPU) print=5 sys=no record=record1.sql


The resulting output file contains the following type of information for all SQL statements processed, including the ALTER SESSION commands:



count = number of times OCI procedure was executed


cpu = cpu time in seconds executing


elapsed = elapsed time in seconds executing


disk = number of physical reads of buffers from disk


query = number of buffers gotten for consistent read


current = number of buffers gotten in current mode (usually for update)


rows = number of rows processed by the fetch or execute call



Note that the trace file is a point-in-time picture of what happened on the system at a given moment. In contrast, the explain plan (detailed analysis) is generated when the TKPROF listing is analyzed.


SELECT COUNT(*)


FROM dual


call count cpu elapsed disk query current rows


------- ----- ----- ------- ------- ------- ------- -------


Parse 1 0.02 0.02 0 0 0 0


Execute 1 0.00 0.00 0 0 0 0


Fetch 2 0.00 0.00 0 1 4 1


------- ----- ----- ------- ------- ------- ------- -------


total 4 0.02 0.02 0 1 4 1


Misses in library cache during parse: 1


Optimizer goal: CHOOSE


Parsing user id: 121


Rows Row Source Operation


------- ---------------------------------------------------


1 SORT AGGREGATE


1 TABLE ACCESS FULL DUAL


Things to look out for in the trace include:


When tracing lots of statements at once, such as batch processes, you can quickly discard those statements which have an acceptable cpu times. It's often better to focus on those statements that are taking most of the cpu time.


Inefficient statements are mostly associated with a high number of block visits. The query column indicates block visits for read consistency, including all query and subquery processing. The current column indicates visits not related to read consistency, including segment headers and blocks that are going to be updated.


The number of blocks read from disk is shown in the disk column. Since disk reads are slower than memory reads you would expect this value to be significantly lower than the sum of the query and current columns. If it is not you may have an issue with your buffer cache.


,i>Locking problems and inefficient PL/SQL loops may lead to high cpu/elapsed values even when block visits are low.


Multiple parse calls for a single statement imply a library cache issue.


Once you've identified your problem statements you can check the execution plan to see why the statement is performing badly.


Now What to Do with the output :


I hope this review would be helpful to the technology users in a deep sense as I feel that there is a lot of things yet to be explored but this is just the beginning. Stay happy !!


Manchester United Kingdom
Bulk Fetch Feature in Oracle 8i
Mar 06, 2002 08:54 PM 6807 Views

About Oracle


Oracle is probably the most popular RDBMS (Relational Database Management Systems that we have today. This review doesn't go into all the features of oracle as it would take me ages to complete it and I can't accomodate the same over here. I would discuss one aspect of Oracle and am planning to write some more in coming days. Hence, even though I recommend Oracle 8i to everyone :-), this review doesn't go into the pros and cons, rather discusses one important feature or Oracle, namely Bulk Collect


This is bit technical in nature and everyone may not appreciate it. But if you can tell me a suitable header where I can place this review, I would be grateful.


Bulk Collect Feature in Oracle 8.X PL/SQL


All of you who have worked with large volume OLTP systems will know the importance of the implementation of Host Arrays and Array processing feature available in Pro*c. Using this feature, you can bring large no of records in one go from the database and store it in Host Array's. The processing can be done on the arrays and it can be saved to the database in one shot. This reduces the number of I/O operations and hence the performance of the applications improves.


From Oracle 8 onwards, the same feature is available in PL/SQL as well. Using the BULK COLLECT and Collections, you can process large number of records with ease since you can fetch/update large number of records in one shot(Till Oracle 8 probably you would have used a Cursor, and populated or manipulated one record at a time). I will try to explain the advantage of using the BULK FETCH or BULK COLLECT as its know using the following example.


Let us assume that you are writing a routine to update or increment the salary of a particular group of employees in the emp table. Assume that you have to increment the salary (based on a complicated logic) of all the employees whose DEPT no is 'HR'


The way you would have done before Oracle 8 is shown first. You would have used a cursor and fetched one record at a time, and processed it and update emp. It would have be a tedious process. You would typically write it as:


--Begin Code Sample (Till Oracle 7.X)


DECLARE


CURSOR empcur as SELECT empid,sal FROM emp WHERE dept='HR';


.


nNewSalary NUMBER(28.6);


.


FOR myrec IN empcur LOOP


.


Processing logic here


.


UPDATE emp SET sal=nNewSalary WHERE empid=myRec.empid;


.


END LOOP;


--End Code Sample



The drawback of this method is that for each record, there is a interaction with the database and impact the performance.


Using BULK COLLECT feature you can re-write the same piece of code as:


Begin Code Sample (Oracle 8.x onwards)


DECLARE


TYPE ETable AS TABLE OF emp.empid%TYPE;


TYPE STable AS TABLE OF emp.sal%TYPE;


employee ETable;


salary STable;


CURSOR empcur as SELECT empid,sal FROM emp WHERE dept='HR';


nNewSalary NUMBER(28.6);


.


BEGIN


OPEN empcur;


FETCH empcur BULK COLLECT INTO employee,salary;


CLOSE empcur;


FORALL I IN employee.FIRST..employee.LAST


.


Processing logic here


.


UPDATE emp SET sal = nNewSalary WHERE empno = employee(i);


END;


--End Code Sample



I hope you guys can see the difference in implementation of both these approaches. BULK COLLECT improves the performance tremendously. The key for large volume processing is Reduce I/O Operation as its always the bottle neck. And Oracle has given one more great feature that would make the programmers job much easier.


Note:The only drawback is that you can't use a table of RECORD (more then one column) as the host array. That is the reason I had to declare two tables, one for empid and one for salary.


Disclaimer : This example may not be the best one to illustrate the need for BULK FETCH, its the simplest one I could think of. If anyone has any specific queries reg. BULK COLLECT, kindly put in a comment and I will try to answer the same


Next Review on Oracle 8 Series would be on Locally managed Tablespaces


Rgds


Ranjith


YOUR RATING ON

Oracle8i
1
2
3
4
5

Recommended Top Articles

Recent Questions and Answers on Oracle8i

500
Have a question? Ask away!

X