Просторы интернета

19 Февраль 2015
Earlier
Ср, Авг 21, 2024
После не очень удачной попытки фиксации очевидно более лучшего плана с помощью SQL Profile: , наблюдал странность отображения выполнения запроса (из генерируемого пакета типа XLA_00001_AAD_C_001234_PKG): и странность эта была не в том, что SQL Profile применился не ко всем выполнениям (что не соответствует ожидаемому рез-ту, конечно, но знакомо), а в [...]
Source: iusoltsev.wordpress.com
Пт, Авг 09, 2024

A recent MOS Community forum posting (needs an account) raised the problem of a query with a specific index hint switching between two plans, one using “inlist iteration of a unique index scan” the other using a simple “index range scan with filter predicate”. Here's an example of [...]

Source: jonathanlewis.wordpress.com
Ср, Авг 07, 2024

This is a small case study from one of the MOS Community Fora (needs a MOS account) that I drafted about a year ago. It started out as a question about a two node RAC system running Oracle 19.17 where an SQL Monitor report showed time spent in a [...]

Source: jonathanlewis.wordpress.com
Вс, Июл 28, 2024
, потребляющий заметную долю DB Time, может быть замечен на версиях 19c, описан ранее — Kun Sun. JDBC, Oracle object/collection, dbms_pickler, NOPARALLEL sys.type$ query: When using the JDBC Thin driver to invoke PL/SQL programs with Oracle objects / collections, we can observe dbms_pickler calls, and two NOPARALLEL hinted sys.type$ queries [...]
Source: iusoltsev.wordpress.com
Вс, Июл 28, 2024
1-я проблема sql parse возникла с запросом типа: Parsed short stack: повторяемо указывал на kkooqb / kkoiqb / kkeosl (**), что соответствует длинному циклу OR Expansion с инициализацией/оптимизацией нового Query Block для каждого элемента генерируемой конструкции UNION ALL — классическая и хорошо документированная в Advice for Reduction of Long Parse [...]
Source: iusoltsev.wordpress.com
Пт, Июл 12, 2024

Oracle error 942 translates, for most people, into: “table of view does not exist”. This note is based on a conversation that I had with Mikhail Velikikh on the Oracle-l list server over the last couple of days while looking at the question: “How do I find out which table [...]

Source: jonathanlewis.wordpress.com
Чт, Апр 25, 2024

Here's a silly little puzzle that baffled me for a few moments until I spotted my typing error. It starts with a small table I'd created to hold a few rows, and then deletes most of them. Here's a statement to create and populate the table:

create table t1 (id number [...]
Source: jonathanlewis.wordpress.com
Ср, Апр 10, 2024

What to do when you hit a problem (possibly after an incomplete recovery) that reports an “ORA-00001 unique key violation” on sys.wrm$_snapshot_pk – as reported recently in this thread on the MOSC SQL Performance forum (needs a MOS account.)

Snapshot ids are carefully sequenced, without gaps, so somehow the thing [...]

Source: jonathanlewis.wordpress.com
Пн, Апр 08, 2024

Here's a detail about dbms_output that is probably overlooked because (in most cases) it's ignorable, except that it can lead to unexpected response times when you try using it to debug “busy” operations.

A question on the Oracle SQL and PL/SQL forum asked: “Why is a PL/SQL ‘for loop' [...]

Source: jonathanlewis.wordpress.com
Вт, Апр 02, 2024

In the second part of this series I described some of the technicalities of Index Usage Tracking and showed an example of what I was doing to test the feature. In this episode I'll describe some of the index access methods I've tested and report the results. I've listed [...]

Source: jonathanlewis.wordpress.com
Ср, Мар 20, 2024

In the first part of this series I introduced Index Usage Tracking and the view dba_index_usage – a feature that appeared in 12.2 as a replacement for index monitoring and the view dba_object_usage. In this note I'll give a quick sketch of the technicalities of the implementation and comments [...]

Source: jonathanlewis.wordpress.com
Пт, Мар 15, 2024

In 12.2 Oracle introduced Index Usage Tracking to replace the previous option for “alter index xxx monitoring usage”. A recent post on the Oracle database discussion forum prompted me to look for articles about this “new” feature and what people had to say about it. There didn't seem to [...]

Source: jonathanlewis.wordpress.com
Ср, Мар 13, 2024

Despite their continued presence in the Oracle data dictionary, LONG columns are not an option that anyone should choose; you can't do much with them and they introduce a number of strange space management problems. Nevertheless a recent thread on the Oracle database forum started with the following question: [...]

Source: jonathanlewis.wordpress.com
Вт, Мар 12, 2024

Here's a silly little detail about execution plans on (interval) partitioned tables that I hadn't noticed until it showed up on this thread on a public Oracle forum: it's an execution plan that claims that Oracle will be visiting a partition that clearly won't be holding the data requested.

Here's [...]

Source: jonathanlewis.wordpress.com
Вт, Мар 12, 2024

Here's a little detail that I discovered recently when I wanted to do something a little exotic in 23c on the official Virtualbox VM. There's been a hidden parameter to disable oradebug since (at least) 12.2.0.1. The clue is in the name:

_disable_oradebug_commands

The valid values for this parameter are none, restricted, [...]

Source: jonathanlewis.wordpress.com
Ср, Мар 06, 2024

A recent (Mar 2024) question on the MOSC DB Admin forum (needs an account) asks why a query which runs every few minutes and executes 25 times in 2 hours according to an AWR report never shows up in v$session when you query for the SQL_ID.

SQL> select * from [...]
Source: jonathanlewis.wordpress.com
Ср, Фев 14, 2024
Для ускорения/оптимизации выполнения запроса коллега Сергей Перегудин проанализировал и предложил поправить/зафиксировать план важного, но замедлившегося запроса: , что привело к хорошему ожидаемому рез-ту: — видно, что зафиксированный PHV 3090864955 , предварительно на пару порядков быстрее чем прежний PHV 2165674671 (подтвердилось впоследствии) Внимание привлекло различие длин "хорошего и плохого планов: Сравнивать [...]
Source: iusoltsev.wordpress.com
Вс, Фев 11, 2024

This is a note that will probably be of no practical use to anyone – but someone presented me with the question so I thought I'd publish the answer I gave:

Do you know how object ID is assigned? It doesn't look as if a sequence is used

I'm fairly sure the [...]

Source: jonathanlewis.wordpress.com
Чт, Дек 21, 2023

This is another example of defects in the code to handle descending columns in indexes, with the added feature that the problem is addressed somewhere between 19.4 and 19.10 (it's present in 19.3, gone in 19.11) – which means that if you upgrade to a recent RU of from some [...]

Source: jonathanlewis.wordpress.com
Вт, Дек 19, 2023

I sketched the first draft of this note on 7th Feb 2010, then forgot about it until some time in July 2019 which is when I expanded enough of it to publish as a demonstration of how the session data unit ( sdu / default_sdu_size) parameters in SQL*Net affected [...]

Source: jonathanlewis.wordpress.com
Вс, Дек 17, 2023
отразил флуктуации как суммарного (SUM_DURATION_SECS — на порядок), так и индивидуального времени выполнения, в частности, OEBS concurrent request (конкаррент) 199749495 выполнялся 37550, а 199738741 — 15591 секунд!:( В процессе выполнения конкаррента 199738741 можно заметить стандартный sql_id 2s0c9hrnp6tdr с существенно отличными планами (SQL_PLAN_HASH_VALUE) и временами выполнения (ASH_ROWS PER_EXECS ROUGH_DURATION): — 3+ [...]
Source: iusoltsev.wordpress.com
Пн, Ноя 27, 2023

When you specify that a column used in an index should be a “descending” column Oracle uses the internal, undocumented, sys_op_descend() function to derive a value to store for that column in the index leaf block.

For many years I've claimed that this function simply takes the one's-complement of a character [...]

Source: jonathanlewis.wordpress.com
Пн, Ноя 20, 2023

This is a note that's been awaiting completion for nearly 10 years. It's about a feature (or, at least, a hint for the feature) that appeared in 10.2.0.5 to control some of the inter-process messaging that takes place in parallel execution.

It's a very simple idea that can make a significant [...]

Source: jonathanlewis.wordpress.com
Пн, Ноя 20, 2023

A little detail to remember when trouble-shooting at the session level – some of the information summarised in the Instance Activity figures (v$sysstat) is not available in the Session Activity figures (v$sesstat / v$mystat). The difference goes right down to the x$ objects, and here are two versions of a [...]

Source: jonathanlewis.wordpress.com
Пн, Ноя 06, 2023

This is just a short note (I hope) prompted by a conversation on the Oracle-L list server. A query from a 3rd party application was doing a very large full tablescan with hash join when it should have been doing a high precision index driven nested loop join, and the [...]

Source: jonathanlewis.wordpress.com
Ср, Ноя 01, 2023

I've written a few notes about problems with “descending” indexes in the past (the word is in quotes because it's not the index that's defined as descending, it's a proper subset of the columns of the index). A silly example came up recently on twitter where the cost of [...]

Source: jonathanlewis.wordpress.com
Ср, Ноя 01, 2023

Jump to summary.

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 [...]

Source: jonathanlewis.wordpress.com
Пт, Окт 27, 2023

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 [...]

Source: jonathanlewis.wordpress.com
Ср, Окт 18, 2023

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 [...]
Source: jonathanlewis.wordpress.com
Ср, Окт 11, 2023

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” [...]

Source: jonathanlewis.wordpress.com
Комментирование отключено.