@AndrasGerlits
Why need a global clock when you have a SQL database? It is easy to guaranteed transaction ordering by reading the expected state at the beginning of the transaction. My thoughts with the "New Ennemy" problem and how it works in real life:
If you want to know "What is SQL", don't ask
@MongoDB
Normalization was not invented to reduce storage but for data integrity, and may require more space in tables and indexes. It is not about physical consideration. By the way, SQL is a language.
Do you know what means
#backward
#compatibility
?
You take a binary dump from 1986 and import it into Oracle 20c with one simple command and no additional tool🤓
Different characterset, different OS, different DB version... but same table and data. This is
@OracleDatabase
If you think nothing can be free with Oracle, please name another cloud provider where the ALWAYS free trial is:
📆 unlimited in monthly usage
⌛ unlimited in duration
🆓 with zero risk of being billed
The credit card you enter for trial is NEVER charged.
You can't understand your query performance by looking at the SQL code. The SQL is the spec. The code that is executed is the execution plan. Would be like asking why your trip took longer than expected without telling which road you have taken
You: the database is slow
Me: you read 1.8TB in 15 minutes
You: RDBMS doesn't scale, SQL doesn't scale
Me: this is a 8 vCPU box, 50% idle most of the time
So, today,
#monolithic
is used as a pejorative word for software which:
- link their functions to be executed by one processor without unpredictable latency
- are clever enough to share memory among multiple processes
- can read/write to same files from multiple nodes
🙄
I answered on LinkedIn about how transaction log, redo log, and WAL are the same.
In practice MSSQL transaction log ~= Oracle redo log ~ PostgreSQL WAL
but with more details: 🧵👇🏻
My 19c tip: when you need to create an index in prod but you are not allowed without the 3 month argue, dev, test, qa,... process, just name it SYS_AI_w4t3v3r and act as if it was automatically created by Automatic Indexing 🤣🤣🤣
France is going to
#Lockdown2
and 2 persons out of 3 interviewed on TV doesn't know how to wear a mask🤦♂️ When publicly interviewed about covid... You can imagine late in a restaurant drinking with friends...
#nosurprise
🤷♂️
This is crazy. Oracle has a great free replacement for CentOS and nobody wants it because of the name of the company behind it. How can a company be so wrong in its marketing strategy that nobody wants their free product? 🤷
@OracleLinux
is really great.
Few weeks ago
@ludodba
announced that he is joining the database group at
@CERN
Now my turn ;) I'll join Ludo and the
@CERN
DBA team in September. And even if it is quite hard to quit the amazing
@dbiservices
company, I'm very exited by this new challenge
All the papers like “we moved from database X to Y and all became N times faster”, I read them the same as “my house was dirty and stinky, I moved to this new house and all is nice and clean”. It is not about the X or Y technology but what you do with it (and how you measure N)
Today at
#GoogleIO
, we’re thrilled to announce AlloyDB for PostgreSQL. Based on our decades of experience designing and managing database systems, it provides superior performance and scale for the most demanding enterprise workloads.
Here is an
@OracleDatabase
ORA-2020 for 2️⃣0️⃣2️⃣0️⃣ 🥳
And a New Year's resolution: don't forget to end your distributed transactions... even when you didn't modify any data.
🤦🏻♂️
proof read 10 times a blog post in preview before posting -> ok
Read it once when published -> 10 typos found
It is incredible how our brain is context-dependent 🧠 ☯️
A Key-Value "get" is in single-digit millisecond response time. No difference in
#NoSQL
vs.
#RDBMS
as long as table is partitioned. Here 11ms to read an item from a 7TB table in
@OracleDatabase
. Because B*Tree
#indexes
maintain O(logN) and
#hash
#partitioning
reduce it to O(1) 😎
#ACID
in
#SQL
You define your transaction bounds (Atomicity) and declare integrity rules (Consistency), and the DB will guarantee them even at race condition (Isolation) and across failure (Durability) 👉 SQL is built for transaction + correctness + scalabity + resilience
This is an
@OracleDatabase
.rpm accessible from everywhere without having to manually click the "I accept the Oracle License Agreement". Like just:
yum install -y _
Huge thanks 🙏 to
@GeraldVenzl
long work for that 👏
If you use a "last_update" column updated by a trigger to try to replicate the changes incrementally, there are good chances that you miss some transactions like this. Use Change Data Capture, not home-made triggers🚀
You know why RDBMS are not
#serverless
? Because they add a buffer cache to reduce I/O. And a library cache to use less CPU. Warming up a
#cache
and keeping it between peaks of activity is actually a
#feature
. To use less resources and get higher and predictable performance.
Wanna see which process is the bottleneck in your Linux command line chain -
#pSnapper
can help:
Tar spending most of its time *waiting* writing output to STDOUT. Gzip is 100% on CPU and consumes as fast as it can. Gzip's CPU usage hits the bottleneck!
SQL databases with ACID properties guaranty that what you validate with single-thread tests has the same behavior, with no corruption, when scaling to multiple sessions. Even at race behavior, and though any failure
🤔How this cannot be perceived as the best developer experience?
🔬 Parsing PostgreSQL's auto_explain logs, scraping with prometheus, displaying with Grafana.
💡 heatmaps of the number of scans and total number of rows per scan operation, with table / index name
To optimize PostgreSQL garbage collection, it is crucial to understand how it works. Cleanout can occur before vacuuming, during reads, and can limit space and read amplification
Me to wife exactly one year ago: don’t worry this Ethernet cable through the corridor is just temporary to see if zoom connection is better 🤣
#stillThere
If you think that Year
#2020
brings only bad things, there's something that will change your mind. 🎈Predicate Information is finally visible
@OracleDatabase
20c
#awrsqrpt
🙌 (Huge thanks to
@vldbb
and all who voted on 🙏)
This website helps oracle users everyday and the guy behind it is really cool. You talk to him like if he just wrote a few posts about a few topics. But he documented everything. Amazing work. The best example of community sharing.
Not many conferences cover databases in general, without being restricted to one DB. 🤔 I'd like to hear (or talk) on MVCC implementation in various SQL databases. Do you know of a conference where this topic would fit well?
I think that there are too many 'expert' sessions in conferences and not enough on the basics. In 2020 I'll propose a "SQL Basics" talk. For the next gen of DataDevs who may have missed courses about this 4th generation language.
The beauty of
@OracleDatabase
MVCC implementation
You can:
- get data from the past (select … as of timestamp)
- query it with the past value of the key
- and still use index access to it 😎
It is like a time machine, implemented at block level (data blocks and index blocks)
@samokhvalov
@ascherbaum
@the_hydrobiont
For your information, I use this tutorial from Digital Ocean to show my students they need to be very careful about any tutorial they can find on the internet regarding postgres...
No, pgdump is not a backup. It's a data export.
A RDBMS should allow:
create table demo (n int unique)
insert into demo values(1);
insert into demo values(2);
update demo set n=n+1;
Without error.
I let you run this:
on
@MySQL
@mariadb
@PostgreSQL
@_sqlite_
...
then with commercial databases...
When
@OracleDatabase
was used for the construction of
@CERN
LEP (large electron-positron collider), predecessor of LHC (large hadron collider), total data was 2GB.
Today: 2PB in Oracle databases, with Maximum Availability Architecture.
#AmazingTechnology
19c available on-premises 🎉🥂
I'm very exited by those new features available on any platform/edition:
_No_ Automatic Indexing
_No_ SQL Quarantine
_No_ Real-Time Statistics
_No_ High-Frequency Statistics
Those will keep my job of data modeling, tuning & troubleshooting😋😂
# a quick function to see which address the SCAN listener redirects to for a given service:
scan() { strace -s 1000000 -v -yy -e read,write sqlplus x/x@"$1" </dev/null 2>&1 | awk '/(read)[(][0-9]+[<](socket|TCP):.*0@[(]ADDRESS=/{sub(/^.*0@/,"");sub(/\\.*$/,"");print}' ;}
In 19c
any CDB
in any edition
without any option
can contain 3 PDBs
Even in Standard Edition you can clone, thin clone, refreshable clone, relocate online, unplug/plug, lockdown, throttle, isolate and
#consolidate
!
😢 To his team, his friends, his family.
@vanpupi
was an enthusiastic oracle community advocate, an always willing to help product manager, and a friend.
I'll talk about wait events at
@POUG_ORG
workshop () and thinking about an easy way to remember the wait event colors we see in grid control performance hub...
Database performance solutions
1990: denormalize your relational DB -> duplication
2000: split columns of the same rows -> columnar DB
2010: group rows and columns from different tables -> document DB
😏 When all you need is to create the right indexes on your relational model
Finally an official
@OracleDatabase
XE (the free version) container image available without the need to login:
podman pull gvenzl/oracle-xe
A medium and large version for more features 👍
Thanks
@GeraldVenzl
Not using prepared statements is like compiling a function at each call. SQL databases are fast and smart but that’s not a reason to abuse. Use PreparedStatement 👇
You can connect directly to a PDB from a Bequeath (aka local aka no-listener) connection. Of course you need a common user for that.
SESSION_SETTINGS in CONNECT_DATA can set session parameters, sql_trace, container... There's also MODULE_NAME and MODULE_ACTION and maybe more...
🙄 when I read things like "historically data was all stored in a monolithic datastore"
No! Historically data was spreaded everywhere and we have built databases to get out of that mess of inconsistent heterogeneous unprotected inefficient uncontrolled duplicated fragmented data
# connection rate to the listener
adrci exec='set home diag/tnslsnr ; show alert -term -p \"' "MESSAGE_TEXT like \'%establish%\' and ORIGINATING_TIMESTAMP > \'2018-06-07 00:00:00\'" '\"' | awk '/establish/{sub(/:.*/,"",$2);print "connection/hour at "$1,$2":00-"$2":59"}' | uniq -c
Sometimes joining two tables is cheaper than fetching from a single table. Do not try to reduce joins in a premature optimization attempt. What matters is how rows are stored and accessed. Not which table they belong to. That's how SQL works
@houlihan_rick
@vlad_mihalcea
@databasestar
The cost depends on many other things than being from one or many tables. Here is a simple example of printing 100000 "Hello World" from one or two tables, where the merge join is faster:
This place is 30 min walk from where I give the
@dbiservices
Oracle Tuning workshop tomorrow. Shouldn’t we just bring the laptops there? All labs are in the cloud.
You don't scale a SQL database with a distributed filesystem. You scale out a DB with a distributed DB. It has to distribute all read/write intents, locks, and transaction status.
Monolithic DBs write this into a single machine (shared buffers in RAM).
@abreng01
@eatonphil
Because it is a misconception that databases write their changes into files. They write to the shared buffers. This is what doesn't scale-out in monolithic databases: the shared memory. Scaling out the filesystem improves checkpoint and recovery time but doesn't distribute the DB
SQL: fast master-detail join with composite key
Devs in 2000: Don't use SQL, use ORM
ORMs in 2005: Don't use composite key
NoSQL in 2010: SQL Joins don't scale
DDB in 2015: single table design
Do you know what is this single table design?
Composite key
💀
The secret of preparing a good technical presentation: spend hours to prepare many slides to cover all details and then remove 42% of them because you cannot go through all those details in 1 hour. But this preparation is important to be ready to talk about the topic
😭My demo on roundtrips between client and server takes 2x longer when the DB runs on Docker
😲Most of the CPU time wasted in docker-proxy (paravirtualisation spin lock slow path?)
🤔This
@Docker
thing is a bad joke
😡wasting my time with software delivered as docker image only
More than NoSQL vs. RDBMS the big difference in database engines today is about B*Tree vs. LSM-Tree indexing optimizing high throughput reads or writes in priority👇
@jdarrow
@CacheFlush
shutdown abort on the primary 🤔 The story doesn't tell if there is a FSFO observer transparently failover to the standby ensuring the application continuity 😜
It was the time in the year where contributions are evaluated for
@Oracle
ACE level evaluation. There's always some questions about this, and some misconceptions. Then I've written a blog post to explain what the
@oracleace
program is not:
We had mechanical disks with latency in milliseconds. And we knew why (rotation/seek). Then we invented SSD and latency was sub-millisecond. Then we invented the cloud, and latency is again in milliseconds. But there's a difference: I've no idea why 😂
A
@brendangregg
FlameScope on
@PostgreSQL
pgbench --no-vacuum --protocol=prepared --builtin=select-only --jobs=1 --client=1
If you think you stress one database thread with this, it is not. The most active samples are in context switch. Most of elapsed time is network roundtrip.
One of the best feature of
@OracleDatabase
is the ability to disable any single feature when it causes problem. The software is complex, issues may happen, 3 days later the SR is still answered by robots... being agile on fixes or workarounds is very important.
What many people don't understand with SQL is that it is declarative. When you say ORDER BY it doesn't tell the DB to sort the data. It declares that you want an ordered result. Only the execution plan will tell you if there's a sort operation or not
No dirty reads + no locks is the default behaviour in Oracle.
Sounds normal for us but looks like magic for other commercial databases.
The
#1
Oracle feature: you can query your OLTP database with consistency (no need to lock for that) and perfornance (no vacuum/reorg required)