Просторы интернета
A new optimizer feature that appears in 23c (probably not 21c) was the ability to push group by clauses into union all set operations. This will happen unhinted, but can be hinted with the highly memorable [no_]push_gby_into_union_all() hint that appeared in 23.1.0.0 according to v$sql_hint. and [...]
That's not the 23rd article I've written on sql_trace, it's just that there's a little “catch-up” detail about sql_trace that I recently discovered in 23.2 (though it might also be working in 21c or even in recent versions of 19c).
Although level 4 and 8 (binds and waits) of the SQL [...]
This is a note that echoes a feature (dating back at least as far as 10.2.0.4) that I've described in a previous post on Simpletalk. I'm raising it here for three reasons
first it says something about optimising SQL by rewriting it secondly it advertises the hugely under-used feature [...]This is a second follow-up to the video Connor McDonald produced a few days ago about the risks of depending on “current tricks” to control the order of predicate operation, then showing how some requirements for the pattern “check condition B only for rows which have already satisfied condition A” [...]
As the years roll by, Oracle Corp. introduces new procedures (and functions) to replace older procedures that were inefficient, or gave away too much privilege, or simply had used bad naming standards. In relatively recent versions Oracle Corp. has introduced a pragma in the declaration of such procedures/functions that [...]
The “common table expression” (CTE) also known as “with clause” or “factored subquery” has been the target of an optimizer upgrade in recent versions of Oracle that may cause a problem for some people – including, possibly, a few of my former clients and readers who may have adopted a [...]
A recent post on the Oracle SQL and PL/SQL forum posted the following query with a complaint that it produced the wrong results:
select count(*) from all_synonyms left join all_objects b on (b.owner,object_name)=(select table_owner,table_name [...]A recent post on one of the forums (needs a MOS account) asked if it was possible to change a batch of SQL Plan Profiles from “exact match” to “force match” without going through the hassle of dropping and recreating them. This took me back a couple of [...]
This is a follow-up to a comment on an earlier post about LOBs and sizing. The comment raised a question about finding the stored size of xmltype data (which is essentially a LOB enhanced to include “methods”) particularly when it's declared with compression.
This is one of those questions where [...]
Here's a note that was prompted by a report about a delete that started up lots of PX processes but apparently did a serial delete even though parallel DML has been forced (alter session force parallel DML parallel 10). The description of “serial” was subsequently refined to explain that “only [...]
A fairly common question about parallel DML is: “Why isn't it happening?” A fairly common (correct) answer to this question is: “Because you haven't enabled it.” Unlike parallel query and parallel DDL which are enabled by default parallel DML could cause strange deadlocking side-effects so you have to enable it [...]
Here's an example of reading an execution plan that appeared on one of the Oracle forums recently. It's a simple example, made harder by the initial (costmetic) presentation of the problem. Essentially the owner has said:
Here's a query that's taking too long. Here's a bit of the query that [...]The three laws of Oracle DBAs (with apologies to Isaac Asimov)
First Law: An Oracle DBA may not harm data or, through inaction, allow data to come to harm. Second Law: An Oracle DBA must ensure that the database is highly available provided such availability does not conflict with the First law. Third [...]Here's a problem that appeared on the Oracle-L list server a little while ago. It features an Exadata system with a “very large” GTT (global temporary table) and a pair of queries that are repeated frequently, using a different literal value on each repetition of the pair.
The queries, with [...]
Here's a little quiz that came to light on a database running 11g. It's one of those anomalies that is likely to get noticed only in fairly extreme cases and it's about DDL rather than DML so it shouldn't be happening very often on anyone's system.
Read through the following script [...]
A historic complaint about the result cache was that it did not scale. Although this complaint was often the consequence of the mechanism was being used inappropriately, there was an underlying issue that imposed a limit on how scalable (in terms of concurrency) the cache could be: it was covered [...]
This note is just a little background for an impending article on the costs and effects of exchanging partitions, splitting partitions, merging partitions – or any other DDL on partitions except dropping them – in the light ofr “deferred global index maintenance”.
Summary Information: while a “typical” rowid is stored in [...]
This is a list of articles I've written that pick up some details (usually problems or bugs) when upgrading. Each entry has a date stamp and a short note of the contents. The articles are generally listed most-recent first but the catalogue is in two sections: Benefits and Bugs and [...]
A question appeared recently in a comment on a blog note I wrote about the new (in 12c) deferred global index maintenance that allowed the execution of a drop partition to return very quickly. The question was in two parts:
Why is an exchange partition so slow by comparison? Is there [...]At present this is just a place holder to remind me to finish commenting on (and correcting) a mistake I made when I wrote a note about the number of bytes of data you could get into an “enable storage in row” LOB before it had to be stored [...]
I've commented previously on the “new” cost-based Or-Expansion introduced in 12c to replace the “legacy” Concatenation transformation, and I've been re-running some of my concatenation scripts to see whether the most recent versions of the optimizer will use Or-expansion unhinted in places where I've previously had to use hints [...]
This example appeared quite recently on one of the public Oracle Forums, and the person who posted it had already worked out (the important bit of) what was going on before anyone asked for more information or supplied any suggestions for action (although there was one response pointing to [...]
Here are the introductory comments I made at a recent “Ask me Anything” session about indexing arranged by the All India Oracle User Group:
There are 4 fundamental thoughts that you need to bear in mind whenever you're thinking about what indexes your application needs:
The intent of indexing is to [...]