23ai for Developers in 90 seconds!
2:06
2 сағат бұрын
Connection pools in 90 seconds
2:19
7 сағат бұрын
Patching and Upgrading in 90 seconds
2:20
12 сағат бұрын
Simple steps to Faster Database Code
15:46
Which rows are locked in my database?
7:15
The mysterious KEEP clause in SQL
4:05
Selfies at CloudWorld
0:33
2 ай бұрын
The ACEs at Kscope 24 Nashville
1:13
23ai - Check your Tablespace DDL
2:20
Пікірлер
@relaxinghike
@relaxinghike 20 сағат бұрын
Looks great. Please compare these methods with the new Priority Transactions in Oracle 23ai.
@QueryTuner
@QueryTuner 21 сағат бұрын
Missing the Lego bricks, Chris likes to show case his SQL examples .. 🙂 Greetings from Hessen in Good Old Germany.
@undeuxtroiskid
@undeuxtroiskid Күн бұрын
My two favorite SQL Gurus in one video.
@berndeckenfels
@berndeckenfels 3 күн бұрын
I find it incredible hard to have small connection pool limits in complex applications , since they can deadlock when full (thread which holds a connection in one component low level calls to a function which needs its own and blocks). Only very disciplined and holistic architecture layers can avoid that really. This is clearly where microseconds shine
@prakash5935
@prakash5935 4 күн бұрын
Hey Connor, how to extract only this type of string using regular expression '*1 Connor'
@DatabaseDude
@DatabaseDude 3 күн бұрын
SQL> select regexp_substr('Hello *1 Connor World','\*1 Connor') from dual; REGEXP_SU --------- *1 Connor
@SandeepSandhu
@SandeepSandhu 4 күн бұрын
good to see you both. little caveat** if someone executed "make -f <> <>" in earlier home and after "OPP" this will be lost. I have a customer where we have such enabled per oracle recomendations and always have to check this before we go with OPP.
@DatabaseDude
@DatabaseDude 3 күн бұрын
Excellent point. I'll pass this on to the team because it might be something we can detect and at least warn about
@MrPants-xy6db
@MrPants-xy6db 5 күн бұрын
Great explanation. I stumbled across the 'date' function a few years ago more or less by accident. I tend to use it with ad-hoc queries but always use full blown to_date / to_char in production code. Old habits die hard 🙂
@DatabaseDude
@DatabaseDude 3 күн бұрын
True. I am too a dinosaur when it comes to breaking habits
@blindender9979
@blindender9979 6 күн бұрын
How to use the sql engine on a insert select of 100 milions of records? Without blowing away the undo table space? Im offen using cursor with bulk and limit. Then, forall for the dml (insert or update). But is slow very slow!
@DatabaseDude
@DatabaseDude 5 күн бұрын
For 100s of millions, I'm probably looking at insert-append (a lot depends on whether you can handle the implications of that)
@zhekappp
@zhekappp 9 күн бұрын
There is another possibly better approach besides creating additional table which requires some extra maintenance. If the ID column contents will be always inserted like number YYYYDDDnnnnnnnnnnnnnnnnnnnnnnnnnn where YYYYDDD is date for pr_date and nnnn part is just regular sequence we can partition the table based on ID column instead and enable local PK. This will require application logic to adjust queries to use 'parametrized view' which will transform pr_date to the value looking same way as PK for the where condition for partition pruning when fetching not by PK.
@DatabaseDude
@DatabaseDude 3 күн бұрын
True, but the data modellers of the world will be up an arms about embedding information within a column :-)
@zhekappp
@zhekappp 3 күн бұрын
​@@DatabaseDude well, denormalization by propagating the date value to all the child tables seems worse to me.
@asrytube
@asrytube 9 күн бұрын
Thanks for the video. Will study this feature in depth.
@DatabaseDude
@DatabaseDude 3 күн бұрын
My pleasure
@berndeckenfels
@berndeckenfels 11 күн бұрын
Could be a COMPAT level thing? (Although in the specific case not keeping parse errors seems to be low risk)
@DatabaseDude
@DatabaseDude 5 күн бұрын
Using 'compatible' for this case seems to be a big hammer to me.
@berndeckenfels
@berndeckenfels 5 күн бұрын
it doesn’t have to be the only option but having myriad of new features which are never turned on on new installs (or a lot of useless non default init Params) is also pretty ugly when there is a good option for changing defaults. Will the dbca template get those switches?
@RAJKUMARSHARMA-gf2ke
@RAJKUMARSHARMA-gf2ke 11 күн бұрын
Amazing🎉❤
@DatabaseDude
@DatabaseDude 5 күн бұрын
Glad you liked it!
@brijeshkarmakar1299
@brijeshkarmakar1299 12 күн бұрын
Thank you Conor :)
@DatabaseDude
@DatabaseDude 12 күн бұрын
you're welcome
@johnparker7945
@johnparker7945 13 күн бұрын
v$active_session_history is restricted to EE with diag and tuning packs. What's a replacement that everyone can use?
@DatabaseDude
@DatabaseDude 13 күн бұрын
check out Snapper by Tanel Poder (free) tanelpoder.com/snapper/
@QueryTuner
@QueryTuner 13 күн бұрын
... and I still want to have or buy this OMG shirt somewhere ... 🙂 Greetings from Hessen/Good Old Germany.
@DatabaseDude
@DatabaseDude 13 күн бұрын
Greetings from Perth but on my way to Germany (DOAG)
@fahdbahoo1
@fahdbahoo1 13 күн бұрын
What about setting idel timeout in profile ?
@berndeckenfels
@berndeckenfels 13 күн бұрын
Careful with unconditional idle timeouts, some connection pools are not good at keeping connections equally busy
@taburiss42
@taburiss42 13 күн бұрын
Thanks as always! Only that I think you said there are three options but presented just two...
@DatabaseDude
@DatabaseDude 13 күн бұрын
Sorry, that got left on the editing floor for brevity. Idle session timeout in profiles.
@JoniPriya
@JoniPriya 16 күн бұрын
you are my amazing (guru means) teacher ,love you for all these lessons,god bless you connor
@TheEsesman
@TheEsesman 18 күн бұрын
Great video!
@DatabaseDude
@DatabaseDude 18 күн бұрын
Glad you enjoyed it
@sobanya_228
@sobanya_228 18 күн бұрын
In sql?
@DatabaseDude
@DatabaseDude 18 күн бұрын
Yes, in SQL
@fahdbahoo1
@fahdbahoo1 19 күн бұрын
Finally
@DatabaseDude
@DatabaseDude 18 күн бұрын
indeed
@marekjanosik
@marekjanosik 21 күн бұрын
Thank you
@DatabaseDude
@DatabaseDude 20 күн бұрын
You're welcome
@rydmerlin
@rydmerlin 21 күн бұрын
To hint or not to hint?
@DatabaseDude
@DatabaseDude 18 күн бұрын
last resort
21 күн бұрын
Thanks for the Great video! Is there the example code available somewhere?
@DatabaseDude
@DatabaseDude 21 күн бұрын
Look for "oh_bulkmig" in my github rep under "office hours" github.com/connormcd
@toomuchtube
@toomuchtube 21 күн бұрын
Planning to make a silk purse?
@DatabaseDude
@DatabaseDude 21 күн бұрын
oink :-)
@apolishchuk1880
@apolishchuk1880 21 күн бұрын
I liked the video, but "calling the web service" from the PLSQL block sounds like... the main part that should be fixed here :-D
@DatabaseDude
@DatabaseDude 21 күн бұрын
PL/SQL was just the simple example - the same principle applies anywhere. But fair point :-)
@PeterHitchmanYT
@PeterHitchmanYT 21 күн бұрын
Just on the last point of the video, no one is going to praise you for making that 8 hour overnight batch job run in 30 minutes, generally I always found that such work was more about me wanting to free up db resources so that it could cope with the additional functionality being crammed into the existing system.
@DatabaseDude
@DatabaseDude 21 күн бұрын
Cloud changes that equation I think ... because you are literally saving real money
@Info-Galaxy
@Info-Galaxy 22 күн бұрын
Useful and informative, Thank you so much for your efforts, as usual you are always there with very good and simple examples.
@DatabaseDude
@DatabaseDude 21 күн бұрын
My pleasure!
@vikram4755
@vikram4755 22 күн бұрын
commit frequency was a good one!
@ismaelmetero4121
@ismaelmetero4121 22 күн бұрын
Very interesting and a good example of refactoring existing code.
@DatabaseDude
@DatabaseDude 21 күн бұрын
Glad you liked it
@virajmokadam4719
@virajmokadam4719 22 күн бұрын
Thank you.
@DatabaseDude
@DatabaseDude 21 күн бұрын
You're welcome!
@sabyasachimitra5719
@sabyasachimitra5719 22 күн бұрын
Excellent use of KEEP. If I may add, we have to consider the case if the rank column contains NULL and use NULLS LAST or FAST (based on the order) to exclude NULLs in the ranking.
@DatabaseDude
@DatabaseDude 22 күн бұрын
excellent point!
@AnujSingh-vo7pf
@AnujSingh-vo7pf 26 күн бұрын
Hi Connor 08:15:40 SQL> select ORPHANED_ENTRIES ,status from dba_indexes where index_name='T_PAR_PK'; ORP STATUS --- -------- NO VALID Elapsed: 00:00:00.00 08:14:09 SQL> alter table t_par drop partition p3 update indexes; Table altered. Elapsed: 00:00:19.57 08:15:40 SQL> select ORPHANED_ENTRIES ,status from dba_indexes where index_name='T_PAR_PK'; ORP STATUS --- -------- NO VALID Elapsed: 00:00:00.00 Why aren't there any ORPHANED_ENTRIES in the index ?
@DatabaseDude
@DatabaseDude 25 күн бұрын
because you said "update indexes".
@AnujSingh-vo7pf
@AnujSingh-vo7pf 24 күн бұрын
@@DatabaseDude please check video again at 5:46 alter table t_par drop partition p3 update indexes; at 5:59 YES <<< ORPHANED_ENTRIES
@QueryTuner
@QueryTuner 19 күн бұрын
@@AnujSingh-vo7pf Did you populate the table partitions with some data ? If there is no data in them, then there will also no orphaned entries in the index.
@AnujSingh-vo7pf
@AnujSingh-vo7pf 18 күн бұрын
@@QueryTuner create table t_par partition by range (par_date) interval ( numtodsinterval(14,'DAY')) ( partition p1 values less than ( date '2024-05-01' ), partition p2 values less than ( date '2024-05-15' ), partition p3 values less than ( date '2024-05-31' ), partition p4 values less than ( date '2024-06-15' ), partition p5 values less than ( date '2024-06-30' ), partition p6 values less than ( date '2024-07-15' ), partition p7 values less than ( date '2024-07-31' ) ) as select rownum pk,date '2024-04-20' +trunc(rownum/370000) par_date, d.* from dba_objects d, (select 1 from dual connect by level <=400 );SQL> exec dbms_stats.gather_table_stats('','T_PAR'); SQL> exec dbms_stats.gather_table_stats('','T_PAR'); PL/SQL procedure successfully completed. SQL> select num_rows from dba_tables where table_name='T_PAR' ; NUM_ROWS ---------- 28455200 SQL> select count(*) from T_PAR ; COUNT(*) ---------- 28455200 SQL> set linesize 500 pagesize 300 col TABLE_NAME for a20 col PARTITION_NAME for a20 col HIGH_VALUE for a80 SELECT table_name, partition_name, num_rows,high_value FROM dba_tab_partitions WHERE table_name='T_PAR' ORDER BY 1,2; SQL> create unique index t_par_pk on t_par(pk) parallel 8; Index created. SQL> SQL> alter index t_par_pk noparallel ; Index altered. SQL> alter table t_par add constraint t_par_pk primary key ( pk ) using index ; Table altered. SQL> select partitioned from dba_indexes where index_name='T_PAR_PK'; PAR --- NO
@AnujSingh-vo7pf
@AnujSingh-vo7pf 18 күн бұрын
@DatabaseDude
@iejjeeeeeedjsnckdsn
@iejjeeeeeedjsnckdsn 27 күн бұрын
As a Java programmer, I always struggle with SQL data flow. I kind of 'invented' chained 'WITH' clauses to reason about queries. So I looked it up and found this video. Great summary of why it's useful.
@DatabaseDude
@DatabaseDude 25 күн бұрын
glad it helped
@vijaybhai4866
@vijaybhai4866 27 күн бұрын
Thankyou. Locks has been the chapter I skipped whenever I read the manual. Now I know the unique advantage of oracle which non other DB have 🙏🏻🤔
@itshakgm
@itshakgm 28 күн бұрын
Hi. Thanks your information. I think that yet exists an issue/lot of limitations with dblink and clob. In your example, the user querying the clob is the same user that created the dblink but if you try to permit other user (giving privilege or creating view ), you will receive other ORAs like Ora- 2019.
@steveandreassend8620
@steveandreassend8620 29 күн бұрын
Surely there is a case to make option 3 native to the product so it is all transparent? It seems to be the only elegant solution for this problem.
@steveandreassend8620
@steveandreassend8620 29 күн бұрын
ALTER TABLE x TRACK PRIMARY KEY PARTITION; and do some sort of background predicate appending like RLS / VPD does.
@DatabaseDude
@DatabaseDude 28 күн бұрын
I certainly like the concept of that being a declarative part of the database
@dhirajtagadapallewar8475
@dhirajtagadapallewar8475 Ай бұрын
Very nicely explained. Please provide commands to try in test environment
@vikram4755
@vikram4755 Ай бұрын
Wow !
@ppaolucc
@ppaolucc Ай бұрын
Hi Connor, maybe I'm a bit wrong, however: if we would create a global partitioned index (I've seen here a creation of a Global non-partitioned one) we would be able to do partition pruning, even though an maintenance action on partitions (MOVE, DROP, SPLIT, TRUNCATE) would affect the validity of the entire index as well, correct? Thank you
@DatabaseDude
@DatabaseDude Ай бұрын
With older versions yes - no we have the ability to mark "parts" of the index not usable
@ricardooberdanpereira793
@ricardooberdanpereira793 Ай бұрын
How one person can know so much about? Thanks again Connor.
@sergiidziubenko3313
@sergiidziubenko3313 Ай бұрын
Few years ago I spent lot of time to discover this trick with parallel constraint “creation” :)
@fransc2086
@fransc2086 Ай бұрын
Great explanation! Thanks!
@DatabaseDude
@DatabaseDude Ай бұрын
Glad it was helpful!
@gleytonr
@gleytonr Ай бұрын
Thanks so much
@DatabaseDude
@DatabaseDude Ай бұрын
You're welcome!
@marcinbadtke
@marcinbadtke Ай бұрын
Thank you. Fantastic idea.
@DatabaseDude
@DatabaseDude Ай бұрын
Glad you liked it!
@ilpaolotopleggend6663
@ilpaolotopleggend6663 Ай бұрын
Thanks !super video super issue super explanation
@DatabaseDude
@DatabaseDude Ай бұрын
Welcome 😊
@ErickTruter
@ErickTruter Ай бұрын
Great video! Partitions is great but I find often people don't understand the costs involved in using them and often don't use them correctly causing all partition scans.
@DatabaseDude
@DatabaseDude Ай бұрын
Very true!
@ilpaolotopleggend6663
@ilpaolotopleggend6663 Ай бұрын
I'd like also to see more PLSQL code..understand examples with asynchronous cases..and queue.. 💻 ⌛️😮
@ilpaolotopleggend6663
@ilpaolotopleggend6663 Ай бұрын
😮interesting
@DatabaseDude
@DatabaseDude Ай бұрын
I'm hoping we de-deprecate it (if that makes sense)
@ilpaolotopleggend6663
@ilpaolotopleggend6663 Ай бұрын
😊