Oracle PL/SQL – Fastest Way To Execute Code Is? To, Not Execute It! – Function Result Caches – Part I

What is the fastest way to execute a PL/SQL function? If you paid attention to the title, your answer would be “to not execute it at all”. In fact, that is the correct answer and Oracle provides the means to do it. The magic is possible because of an Oracle feature called result cache which […]

Advertisements

Oracle – Fastest Way To Execute SQL Is? To, Not Execute It! – Query Result Cache – Part II

Before you read on, please check out my related post on "Function Result Cache". You may find it valuable in this context. Conversation sounds familiar? I am sure you have been privy to a conversation like this between an IT manager and a DBA: Manager:  My query is extremely slow. Can you make the query … Continue reading Oracle – Fastest Way To Execute SQL Is? To, Not Execute It! – Query Result Cache – Part II

Oracle Tip – COPY Command – When You Don’t Have DataPump

This is an old post that I am re-cycling. The recommended method to copy data around is by using DataPump. However, if you are on an older version of Oracle, COPY command is an easy way to copy data from one database to another or even within the same database. There are countless situations where … Continue reading Oracle Tip – COPY Command – When You Don’t Have DataPump

SQL Server Dynamic SQL – Use Bind Variables

Dynamic SQL – SQL that is constructed by putting together strings to form executable code that gets parsed for the first time by the compiler at run-time. Justification for Dynamic SQL? There should be relatively few instances where dynamic SQL is the only option. Generally, regular SQL whose syntax can be checked by the compiler … Continue reading SQL Server Dynamic SQL – Use Bind Variables

Oracle (or) SQL Server: Find Row Level Data Differences Using MINUS/EXCEPT – 100 Level

Changes needed for SQL Server The simple SQL illustrations mostly show Oracle code but the final SQL is also shown for SQL Server (simply remove the “FROM DUAL” references and replace "MINUS" with "EXCEPT"). What this post is about? When we need to compare two sets of data to find out which rows are different between the … Continue reading Oracle (or) SQL Server: Find Row Level Data Differences Using MINUS/EXCEPT – 100 Level