The following is performance tuning tip #4 from "30 tips in 30 minutes," brought to you by the IOUG. Return to...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
the main page for more tips on this topic.
When a process is on the same machine as the server, use the IPC protocol for connectivity instead of TCP. Inner Process Communication on the same machine does not have the overhead of packet building and deciphering that TCP has. I've seen a SQL job that runs in 10 minutes using TCP on a local machine run as fast as one minute using an IPC connection. The difference in time is most dramatic when the Oracle process has to send and/or receive large amounts of data to and from the database. For example, a SQL*Plus connection that counts the number of rows of some tables will run about the same amount of time, whether the database connection is made via IPC or TCP. But if the SQL*Plus connection spools much data to a file, the IPC connection will often be much faster -- depending on the data transmitted and the machine workload on the TCP stack.
You can set up your tnsnames file like this on a local machine so that local connection with use IPC connections first and then TCP connection second.
PROD = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(Key = IPCKEY)) (ADDRESS = (PROTOCOL = TCP)(HOST = MYHOST)(PORT = 1521)) ) (CONNECT_DATA = (SID = PROD) ) )
To see if the connections are being made via IPC or TCP, turn on listener logging and review the listener log file.
Get more tips in minutes! Return to the main page.
About the author: Kenny Smith has been working with Oracle technology on HP servers for over a decade. He specializes in Oracle database architecture, database administration and development. He has presented at numerous Oracle conferences on two continents. He has published many articles describing Oracle solutions and has co-authored "Oracle backup and recovery 101" from Oracle Press.
IOUG: Become a member of the IOUG to access the paper referenced here and a repository of technical content created for Oracle users by Oracle users.