Събудих се около шест сутринта. Тази нощ поспах добре, но се чувствам все по-болен. Гърло, хрема, отпадналост…
За щастие днес има прекрасно, слънчево време. За нещастие първите ми няколко лекции са в най-студените стаи – 102 и 103 в Moscone South
Сутрешната процедура е еднаква всеки ден. В епъл шопа пак няма телефони, а опашката отпред е относително малка. Служителя, който питах, ми каза „Не знам тия хора за какво чакат, не се знае кога ще получим доставката„. Тия епъл са бахти наглите, нарочно провокират безкраен съспенс. Толкова ли е сложно да се направи система за предвидими доставки? Или, още по-добре – поръчка онлайн и край на всички опашки.
Започваме деня с Resource manager best practice на Sue-Kyoung Lee, Akshay Shah
Една интересна забележка за multitenant (ако някой го ползва изобщо) – every PDB has 1 share and maximum 75% CPU utilization by default
Малко записки:
Resource management is like having a budget – the simpler it is, the higher chance to be followed.
CPU
Even if you overubscribe with instance caging, it’s still much better than no resource manager.On Linux and Solaris, 12c allows you to bind some databases to specific CPU cores or sockets, if you are so hard-core and you have super-super critical DBs (or NUMA)
IORM
With mixed workload, OLTP may get some really slow IOs when DWH kicks in (even up to a second per IO). That’s why IORM protects the latency of OLTP by putting OLTP io requests in front of the queue (otherwise we have FIFO)
To make this, the DB tags every io request with various info. E.g. OLTP is put in prioritized queue, LGWR is out even higher – at the very top, large DWH reads are put with lower priorityStandby DBs
Best practice – use the same resource plan as on primary (CPU and IO)
След това отидох на продължението на една от миналодневните (има ли такава дума? щом има миналогодишни, трябва да има и миналодневни) сесии: Real-world performance of star and snowflake schemes part 2: the reality – Andrew Holdsworth, Mike Hallas, John Clarke
Обясниха, в общи линии, че трябва винаги да се мъчим да докараме execution plan-а до star transformation
This is counterintuitive – you know the output an try to create the input to produce it
С други думи, знаеш как изглежда execution plan-а, и трябва да намериш query-то, което ще ти го докара.
Ето малко записки
There are no predicates on fact table. All filters are on dimensions
Constraints
Always put Not null constraints on join keys – helps optimizer
Put PK and FK constraints. If you do th constraints in RELY mode, remember to enable query_transformation in RELY mode
Data types
Make sure data types between parent and child match (incl. precision)
Statistics
Do not rely on dynamic sampling
Think about correlation
Enable column usage tracking. Gather stats after data load, and again after some real usage, to get extended stats
Partitioning
Partition fact table on time dimensionStar transformation with bitmap indexes is great for extracting relatively low number of rows from fact table
Exadata smart scans and bloom filters are much better for retrieving big amount of data from fact table
In-memory with vector joins is good for big volumes. Actually vector joins are available even for non-inmemory at 12.1.0.2Snowflake is much slower than star
Cardinality estimations is much less accurate, much more unneeded data is moved during joins, etc.
Try hard to go to star, e.g. with mviewsLinks between dimensions are also bad. Never join dimensions. Note: DWH is not intended to enforce business rules!
Never use same dimension key to join to more than one dimension. Each dim should have its own dk
Това за enforce-ването на business rules е много важна забележка, за която не съм се сетил преди. Наличието на constraints в DWH може да бъде обусловено и е полезно само за разкриване на повече информация/възможности на optimizer-a.
Обяд
Доволно, вкусно, бързо. То нямаше и много време, само половин час между лекциите. Но хапнахме добре. Само дето някакви бездарници грачеха – The Afrikanas. Не знам защо, тази година организаторите са решили, че всеки обяд трябва да е съпроводен с музика на живо – при предишните ми посещения нямаше такива неща. Но изглежда бюджета за тази музка е силно ограничен и стига само за някакви квартални банди със собствен транспорт(примерно). Как да е, не ми пречат чак толкова.
Следобеда започнах с If you think partitioning is only for performance, think again – Hermann Baer, Matthias Fuchs
Data management
– fast population of data – prepare aside and exchange partition
– fast removal of data – truncate/drop partition
– fast reorganization of data (compression, movement, etc)12c new features
– merge more than two partition
– split to more than two partitions
– move partition fully online – allows all concurrent DML, takes care of global and local indexes
– async global index maintenance during DROP and TRUNCATE partition. Partition maintenance is metadata-only operation. Data stays in index, index stays valid, no wrong results, etc. Data can be cleaned later by ALTER INDEX REBUILD/COALESCE
– partial local and global indexesTips and tricks for 12c
– gather stats on to-be-exchanged table, do the exchange, global partitioned table stats are automagically updated
– do online move during low-load time. During the move, a journal of changes is kept. The smaller the journal, the faster move completion. Note: first part of move is direct-path, so can compress, but journal apply is row-by-rowsGeneral tip
– try to combine multiple partition maintenance operations into one
– use partition extended bulk load syntax – puts X-lock only on intended partition, not whole table. Careful with data cleanness
Следваща сесия: Trouble free upgrade to Oracle 12c with Oracle Real Application Testing – Kurt Engeleitner (на кого ли не му предстои този ъпгрейд…)
RAT = response time testing + load testing
SQL performance analyze (sqlpa) allows automatically to create tunning task for statements with degraded performance, or to create baselines for them– Always use sqlpa first, to fix individual queries, before running real load test (database replay)
– capture and replay manageable amount if time – 1-2 hours
– key metric of database replay is DB time, not elapsed time
– capture SQL tunning sets during capture and replay for additional validation
– use OEMCC with the very latest database plugin – implements best practices for RAT, new wizards, etc.
След това прескочих до хотел Интерконтинентал да изслушам Been there, done that: real stories of engineered systems pioneers – Amod Khale (America Airlines), Eyad Al-Sahli (AMMROC), Richard Ewald (Sprint), Ron Pollard („Specialized“ bicycle components), Greg Crider (Oracle)
Като цяло тази лекция се водеше като полу-дискусия между IT мениджъри, които са направили смелата стъпка към Oracle engieered systems и споделят опита си от меиджърско ниво.
– Implementation is teamwork – DBAs, Sysadmins, net admins, etc.
– AAMROK is taking care of hi tech weapons of Abu Dabi – Jet fighters for example. You cannot take care of F16 using SQL Server, righ?
– Sprint have had the biggest single-node oracle database – 1.5 petabytes. Keeps 2 years or CDR data.
– AmericanAirlines made PoC on SuperCluster provided by oracle. Worked great, and they purchased it and went liveEngineered systems are organizational challenge. Who owns the box – storage admins, sys admins, net admins, DBAs? Usually DBA volunteer
Engineered systems have great supportability. No finger pointing, everything is clear. Ease of deployment and configuration. You can focus on business
Последната лекция за деня:
The best new Oracle Database 12c features – Rich Niemiec
Този път му се получаваше по-добре. Успя да представи точно 237 слайда. Плюс тоновете бъзици и съвети
Oracle will spend $5B on R&D this year – leverage it!
Can you imagine the size of this company? For OOW, they are carpeting the street! Can you imagine this – somebody calls to the carpet factory and says
– OK, I want red carpet on Howard street
– No problem, sir. On which number?
– Oh, doesn’t matter. Just put it on the whole street from 3rd to 4th!
Хауърд е една от централните улици в Сан Франциско, две-три ленти в едната посока, и e затворена заради конференцията между четвърта и трета улица. Все едно някой да затвори бул. Васил Левски от паметника Левски до университета и да сложи червен килим.
Вечерта
Е, това е вечерта на големия концерт на Treasure Island – свирят Aerosmith и разни други. Ядене, пиене, лунапарк и т.н. Билетите са ограничени, само за full conference attendees. За всички други – билети се продават на черно.
Аз моя билет го подарих. Защото точно тази вечер, или 5:00 сутринта софийско време, имаме планиран switchover test към новия data center. Така че докато другите купонясват, аз ще работя. Това е съдбата на админа…