Posts

Showing posts from April, 2025

Oracle 23ai — Automatic SQL Transpiler Feature

Image
  As you may know, using a function in an SQL statement causes a context switch between the SQL engine and the PL/SQL engine. Frequent context switches can negatively impact database performance. To improve the execution speed of such queries, Oracle introduced  SQL Macros  in version 21c. This feature allows the query text containing a function to be rewritten in a simpler form, without using the function. In version 23ai, Oracle has introduced a new feature called  Automatic SQL Transpiler . If the  sql_transpiler  parameter is set to  ON , Oracle will automatically (and without user intervention) convert the function used in the SQL statement to a SQL expression  when possible , in order to reduce the overhead caused by executing the function within SQL. Consider the following function: create or replace function sal_func(sal_param number) return number is begin return sal_param + 60 ; end ; / Function created. If you use this functi...

Oracle 23ai - Hybrid Read-Only Mode for Pluggable Databases

  In Oracle 23ai, a new open mode called   Hybrid Read-Only   has been introduced for pluggable databases (PDBs). When a PDB is set to this mode,   local users   can only connect with   read-only   access. However,   common users   are not restricted and can still perform   write   operations. SQL > ALTER PLUGGABLE DATABASE ORCLORPDB OPEN HYBRID READ ONLY ; Pluggable database altered. SQL > show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 ORCLORPDB READ WRITE NO Testing Write Access as SYS User Now, we connect to ORCLORPDB as the  SYS  user and test write operations: sqlplus "sys/sys@target:1522/ORCLORPDB as sysdba" SQL > show user ; USER is "SYS" SQL > select OPEN_MODE from v$pdbs; OPEN_MODE ---------- READ WRITE SQL ...