SQL Daily Profile
SQL Daily

@sqldaily

Followers
26K
Following
122
Media
1K
Statuses
3K

Daily Oracle SQL tips from the Oracle Developer Advocates for SQL

Joined January 2015
Don't wanna be here? Send us removal request.
@sqldaily
SQL Daily
2 years
Want to learn a new skill in 2024? Make it #SQL! Oracle Dev Gym has a series of FREE classes to help you do this Start with Databases for Developers: Foundations Join at https://t.co/k8dYUDTwwo
0
35
114
@sqldaily
SQL Daily
3 hours
Tracking changes to values over time is a common requirement For example, recording price fluctuations for goods Alexey Makhotkin steps through designing tables to store these changes, proposing template tables with Anchor Value Valid from/to dates https://t.co/Cp2o4SflIJ
kb.databasedesignbook.com
Author: Alexey Makhotkin [email protected]. (Word count: 3200). A common problem in business-oriented database design: keeping the history of values of a certain data attribute. For example, we may...
0
2
7
@sqldaily
SQL Daily
1 day
Change the partitioning method for an Oracle table with: ALTER TABLE ... MODIFY PARTITION BY ... This can change The partition method (RANGE/LIST/HASH) The partition columns Add/remove subpartitioning Add the ONLINE clause to allow writes to continue while changing
1
6
15
@sqldaily
SQL Daily
4 days
Like #SQL? Like puzzles? Try #SQuizL A free, daily guess-the-SQL statement quiz You have up to six attempts to complete the statement on the top left using the fragments below There's a new statement to guess at every day at midnight UTC Play now at https://t.co/L2cjHVO9i2
0
3
19
@sqldaily
SQL Daily
5 days
You can run in-database AI inference on Oracle Active Data Guard @ludodba shows you how to do this to find images with semantic search Loading an ONNX model & pictures Creating PL/SQL to generate embeddings Running this proc and searches on the standby https://t.co/lv4ozKDyvv
Tweet card summary image
blogs.oracle.com
Offload AI inference to Oracle Active Data Guard for improved scalability, cost-efficiency, and security without external APIs or added complexity. This practical walkthrough explains how to run...
0
3
16
@sqldaily
SQL Daily
6 days
When tuning #SQL, focus on the estimates for how many rows each operation will return If these are off by an order of magnitude or more, there's a good chance a different plan is faster @TanelPoder has built scripts to show misestimates in Oracle plans https://t.co/lU91tclnDf
1
9
22
@sqldaily
SQL Daily
7 days
Oracle AI Database 23.26.0 developer features include QUALIFY clause GraphQL Table Function for SQL SQL Objects and Collections in MLE JavaScript PL/SQL RESETTABLE clause to avoid ORA-04068: existing state of packages has been discarded @GeraldVenzl
Tweet card summary image
geraldonit.com
For more information on what’s new in Oracle Database 23.9, see: What’s new for Developers in Oracle Database 23.9 Oracle AI Database 23.26.0 brings some fantastic new features to developers—again!…
0
10
18
@sqldaily
SQL Daily
8 days
Define schema-only accounts in Oracle AI Database with CREATE USER ... NO AUTHENTICATION => you can't connect as this user To run scripts as-if you're a schema-only account, use a proxy user ALTER USER schema_only GRANT CONNECT THROUGH proxy CONN proxy[schema_only]/<pwd>
1
6
16
@sqldaily
SQL Daily
11 days
Want to find the Nth highest value in a table? e.g. the 3rd highest salary/department? Number the values with DENSE_RANK () OVER ( PARTITION BY ... ORDER BY ... DESC ) Then filter where the output of this is 3 @RebellionRider demos
0
5
16
@sqldaily
SQL Daily
12 days
How do the data types of join columns affect query performance? Dani Schnider compares using Hashes as CHAR(32) and RAW(16) Sequences as NUMBER And finds in Oracle #SQL NUMBER is faster than RAW RAW is faster than CHAR https://t.co/ht7zpEsCIX
Tweet card summary image
danischnider.wordpress.com
The data type of primary key and foreign key columns has an impact on the query performance. This should be considered in the design decision of keys in a Data Vault schema.
0
4
18
@sqldaily
SQL Daily
13 days
Triggered by traumatic DML errors? Mike Smithers shows how to recover in Oracle AI Database when you accidentally remove data with FLASHBACK TABLE ... TO BEFORE DROP => restore a dropped table TIMESTAMP => revert to a point in time https://t.co/Qd9PsktLfI
Tweet card summary image
mikesmithers.wordpress.com
Triggered by traumatic DML errors ? Well, here’s one flashback you won’t mind having…
0
4
15
@sqldaily
SQL Daily
15 days
In PL/SQL EXCEPTION WHEN OTHERS THEN Catches all errors Filling your code with this without reraising the error hides unexpected issues So the compiler raises PLW-6009 to warn you If you reraise in custom logging procedures use PRAGMA SUPPRESSES_WARNING_6009 To skip this
0
9
21
@sqldaily
SQL Daily
18 days
Get free access to Oracle AI Database at https://t.co/GfUNgDcdbw This browser-based tool enables you to run and share #SQL statements Even better, you can now connect to your schema from clients on your machine using SQL*Net So you can run SQL from your favourite IDE
2
10
29
@sqldaily
SQL Daily
19 days
Oracle Virtual Private Database enables you to transparently add WHERE clauses to restrict what users can see See what was added with DBMS_UTILITY.EXPAND_SQL_TEXT But this may expose sensitive values! @connor_mc_d shows how to hide them with contexts https://t.co/TpK6Sq09YR
Tweet card summary image
connor-mcdonald.com
Since way back in version 8.1 of the database, there has been a cool feature in Oracle called Virtual Private Database (VPD), which essentially lets you force predicates into SQL statements run by …
0
10
22
@sqldaily
SQL Daily
20 days
Want to find the fastest-growing tables or LOBs in Oracle AI Database? @viniciusdba has built a script that analyzes AWR data to show The 20 segments with the largest total size increases A breakdown of the increase per month for each Get it at
Tweet card summary image
github.com
Some Scripts that I use on my daily basis. Contribute to vinidba/dba_scripts development by creating an account on GitHub.
0
9
30
@sqldaily
SQL Daily
21 days
Poorly written #SQL can lead to slow, hard-to-maintain queries Jordan Goodman covers common anti-patterns you should avoid, including Case expressions instead of tables Functions on indexed columns Overusing DISTINCT to “fix” duplicates https://t.co/DqEpZSLs42
0
7
21
@sqldaily
SQL Daily
22 days
Macros in Oracle #SQL enable you to define expression templates as text At parse time the database merges these with the parent query, replacing parameters with the actual values passed Macros come in two types Scalar - use in SELECT, WHERE, ORDER BY, etc. Table - use in FROM
1
7
27
@sqldaily
SQL Daily
25 days
Oracle wins the multilingual text-to-SQL Archer Challenge by combining planning and #SQL agents Understanding Archer queries requires Arithmetic reasoning Commonsense inference Hypotheticals and counterfactuals Bilingual execution (English + Chinese) https://t.co/WiGBmZ0hb2
Tweet card summary image
blogs.oracle.com
Oracle AI wins 🥇 at the 2025 Archer NL2SQL Challenge, leading global competitors by 9+ pts in execution accuracy. Our Reasoning-based NL2SQL solution achieves English–Chinese parity and >99% SQL...
0
4
17
@sqldaily
SQL Daily
26 days
The KEEP clause - aka FIRST/LAST functions - in Oracle #SQL enables you to get the min/max row for one column sorted by another MIN ( sal ) KEEP ( DENSE_RANK FIRST ORDER BY hire ) => Get the lowest sal for the first hire @quanwen_zhao explores
Tweet card summary image
quanwenzhao.wordpress.com
A few days ago I’ve noticed that Tim Hall have announced the fabulous Oracle community activity about writing the several blog notes on the same day that is Oct 15th this year (on the 2nd or …
1
8
22
@sqldaily
SQL Daily
27 days
Create a flashback archive in Oracle AI Database to record all changes to a table CREATE FLASHBACK ARCHIVE ... RETENTION ... ALTER TABLE ... FLASHBACK ARCHIVE Then view the changes with SELECT * FROM ... VERSIONS BETWEEN ... @Matt_Mulvaney demos
0
10
27
@sqldaily
SQL Daily
28 days
Storing UUIDs as RAW values is more efficient than strings But RAW can lead to implicit conversions => poor row estimates If you're stuck with string comparisons @Andrej_SQL shows how to improve row estimates with Extended stats Virtual columns https://t.co/9SPPa3NhmG
Tweet card summary image
blog.sqlora.com
Learn how implicit RAW-to-VARCHAR2 conversions in Oracle break histograms, hurt optimizer estimates, and how to fix them safely.
0
7
19