Andy Sayer (@AndrewSayer_) profile picture

I enjoy unhealthy food and databases

Hemel Hempstead, East
Joined April 2010
Photo by Andy Sayer (@AndrewSayer_)Photo by Andy Sayer (@AndrewSayer_)Photo by Andy Sayer (@AndrewSayer_)Photo by Andy Sayer (@AndrewSayer_)Photo by Andy Sayer (@AndrewSayer_)Photo by Andy Sayer (@AndrewSayer_)Photo by Andy Sayer (@AndrewSayer_)Photo by Andy Sayer (@AndrewSayer_)Photo by Andy Sayer (@AndrewSayer_)Photo by Andy Sayer (@AndrewSayer_)
Just spotted in the docs: Oracle 23c increases the maximum size of an inline lob to 8000 bytes
1
6
566
Oracle performance quiz for the long weekend. How would you make this fast: count unique clients with unpaid invoices, stop counting at 99, expect 1m unpaid invoices. Basic sql: select count(*) from (select distinct client_id from invoice where status='unpaid') where rownum<=99
6
1
6
2,482
There will be about 100m total invoices, I’ve put together a DB fiddle with mostly random data dbfiddle.uk/17Rg3YxC (ratios are slightly different to advertised but shouldn’t matter too much)
1
246
Has anyone on Windows been able to install 19.18 oracle home from a gold image? Our process has worked for every other patch but this time it’s complaining about not being able to restore cloned files. @myoraclesupport is waiting for other users to raise before treating as a bug
2
1
1
652
Oracle performance: It seems that enabling large pages prevents direct path reads, unless _serial_direct_read=always. Currently raising an SR but has anyone looked into this before? Already tried reducing _small_table_threshold
1
3
6
715
Might be prefetching, as it wants to fill up the cache. Possibly related to it also wanting to startup with Full DB Caching (even though it’s disabled and nowhere near enough memory)
1
2
253
If anyone wants to follow me on Mastodon, my handle is @SQL@mastodon.online (which probably suggests I’ve chosen a wrong server)
3
If you are currently testing DRCP in 19c then check drcp_dedicated_opt. It was defaulted to YES (it’s NO in 21c where it was released). Sessions you’d expect to be freed to the pool are no longer freed (if you haven’t reached max pool size) until they hit inactivity_timeout
3
This could be interesting (if valid) dba.stackexchange.com/questi… adding comments adds 2 seconds to run time. I expect it will be a boring measurement error though
2
1
Dbms_optim_bundle doesn’t work for Windows since 19.11 as it writes commands via utl_file, this command gets too long in 19.11 (so many bug fixes to enable) and the code the pl/sql uses to determine the max line size is off by one as it assumes a one character line break
2
3
4
Most annoying part is figuring out which drop down options to select when raising the SR
5
Raised an SR yesterday for an optimizer problem that gets hit with an EM metric query (Doc ID 2697438.1). Optimizer transforms IN (subquery) to inner join when it later groups by but doesn’t count the number of rows. I can’t see the transformation helping, only hurting
1
2
5
Demo query: SELECT sub.CON_ID,OWNER,JOB_NAME, MAX(sub.ACTUAL_START_DATE) AS START_DATE FROM CDB_SCHEDULER_JOB_RUN_DETAILS sub WHERE sub.job_name in (SELECT job_name FROM CDB_SCHEDULER_JOB_RUN_DETAILS where status = 'FAILED') group by sub.CON_ID,OWNER,JOB_NAME
1
1
I didn’t think I’d be disappointed by v$sql_plan.projection cutting off at ~4000 characters, but here we are
3
1
7
Today is the day 🇨🇦✈️
2
7
Computer is going into boxes for a few months while we move and get settled so I can’t finish the blog post I’ve been working on. It’s about using a domain index for queries with sysdate between start_date and end_date driving filters
1
7
Oracle distributed query believes that a primary key filter will use a FTS (it uses the primary key but cost reported locally is FTS). Rebuilt with CTAS and dbms_redefinition to copy stats etc fixes cost. Query is select pk_col from table@link cross join dual where pk_col = 1 🤔
I knew the functionality wasn’t commonly used, but a bit surprised by the results so far.
Casual Oracle poll: are you using domain indexes (ignoring TEXT and Spatial)?
14%Yes
76%No, never considered
10%No, but I have a use case
21 votes • Final results
1
Casual Oracle poll: are you using domain indexes (ignoring TEXT and Spatial)?
14%Yes
76%No, never considered
10%No, but I have a use case
21 votes • Final results
1
1
Fun oddity in MySQL, order of columns in a group by has influence on whether a first rows style plan can be used dbfiddle.uk/?rdbms=mysql_8.0… (requires the join to matter)
1
It’s a relief when you find out someone raised the bug you avoided raising because it would require too much patience. Bug 29765095 : EXCESSIVE PARSING TIME IN A SQL WITH MANY OR CLAUSES 18.4, it won’t solve the biggest problems with OR but the parse time is unnecessarily high
1
1
6
Just me or is oracle.com down for everyone?
4
1
Oracle Resource manager plan directive with 0 emphasis/ratio for ad hoc read only users - prevents all risk of any cpu impact to your important queries. Why didn’t I think of this before? Because they’ve never been an actual problem, just a fear
2
2