An English edition is not currently available. This page describes the Thai eBook.
Oracle 26ai
SQL Tuning
Make SQL faster
Step by step
Understand the principles, read execution plans and run the labs. Covering Oracle 19c through 26ai, for DBAs and developers who want a practical starting point for slow SQL.

Read the principles, then test them in the lab
19c → 26aiStart with the problem
SQL is slow. Where should you start?
I wrote this for readers who see a slowdown and open the query, but are not yet sure what to investigate.
Before tuning
You see the slowdown, not the cause
- Reading SQL without finding the bottleneck
- Opening a plan without knowing what to inspect
- Wondering whether to add an index or rewrite the query
- Reading several topics without connecting them
What you will practice
Build a reasoned analysis
- Understand how the optimizer chooses a plan
- Read and interpret execution plans
- Examine statistics, indexes and joins before changing them
- Run the labs and observe the actual behavior
Read the background from the preface
When I looked for a Thai-language book about SQL tuning on Oracle 26ai, I couldn't find one. More broadly, Thai-language material explaining Oracle Database is hard to come by.
I don't think that's because knowledgeable people are lacking. Writing a book takes a great deal of time, and people with the experience to write one are often too busy. I nearly decided against writing it for the same reason.
Many Thai DBAs and developers end up piecing things together from the English Oracle documentation. They can read it, but connecting the topics into a coherent picture can take months.
How to learn with this book
Understand, then practice
Do more than read. Install the included lab and run the examples as you work through each chapter.
Understand the principles
Begin with the SQL lifecycle and the optimizer to understand the basis for database decisions.
Read execution plans
Connect the plan with statistics, indexes and data access.
Practice in the lab
Run the examples, observe the results and combine your understanding in the workshops.
From chapter 1
See the SQL and its output
The hard-parse and soft-parse example uses v$sql to inspect executions and plan loads.
SELECT sql_id, parse_calls, executions, loads, sql_text
FROM v$sql
WHERE sql_text LIKE '%LAB_BIND%'
AND sql_text NOT LIKE '%v$sql%';Find statements in the shared pool marked with the LAB_BIND comment.
| PARSE_CALLS | EXECUTIONS | LOADS |
|---|---|---|
| 3 | 3 | 1 |
In this example, there are 3 executions and 1 load. The same page also compares statements using literal values.
Read before buying
Look inside the Thai-language book
Contents, author page and sample text: 15 pages. Choose a category and open a page to enlarge it. The book pages are in Thai.
Inside the book
10 chapters that connect the ideas
From SQL processing to reading plans, tuning statements, maintaining plan stability and practical workshops.
How SQL works
SQL processing architecture and the Cost-Based Optimizer
Understand the SQL lifecycle, parsing and optimizer plan selection
Learn to read plans
Reading and interpreting execution plans
See how the database accesses data and processes a statement
Help the optimizer understand your data
Optimizer statistics and histograms
Understand statistics and data distribution
Find application SQL
Finding SQL submitted by applications
SQL Trace, TRCSESS and TKPROF
Choose suitable access paths
Data access and indexes
Understand data access and index choices
Join and sort data
Joins and sorting
Analyze join methods and sorting steps
Adjust how SQL is processed
Optimizer hints, query transformation and materialized views
Explore tools and approaches for changing execution plans
Understand plan reuse
Bind variables and adaptive execution
Understand plan reuse and runtime adaptation
Keep plans stable
Stability through automation
AWR/ASH, SQL Plan Management and Automatic Indexing
Put it all into practice
Four practical case-study workshops
Apply the preceding chapters to SQL analysis and tuning
2 appendices
A / New SQL syntax
QUALIFY, GROUP BY ALL and VALUES
B / Vector and JSON
Vector and JSON Relational Duality
Some features and tools depend on your Oracle version, edition and licensing. Check the relevant chapter requirements before production use.
Open the contents and sample pagesBefore you begin
Is this book for you?
This book focuses on statement-level SQL tuning for readers who can already write SQL and want to understand what happens behind it.
Who it is for
- DBAs and developers already working with Oracle.
- Readers who have studied databases and want to understand practical work.
Prerequisites
- Ability to write SQL and understand SELECT statements joining several tables.
- Some experience with SQL*Plus or SQLcl.
No prior knowledge of the optimizer, execution plans or statistics is required. I explain those in the book.
What it does not cover
The scope is individual SQL statements. These topics are outside the book:
- Instance tuning, including instance-level SGA/PGA configuration.
- System tuning: OS, storage and network.
- PL/SQL tuning.
Problems at the instance, OS, storage or network level need investigation at those levels.
What you receive
The book and the lab
Ready for hands-on practice
173-page PDF in Thai + Lab setup scripts (.zip)
Author Pornchai Krongthammachart (Tee)
- Format
- E-Book (PDF)
- Page count
- 173 pages
- Language:
- Thai
- Price
- 790 THB
The PDF is marked with your purchase email on every page except the cover. You can download it 5 times. Lab script downloads are unlimited.
Already purchased? Download your book →What should I know beforehand?
You should be able to write SQL, understand multi-table joins and have some experience with SQL*Plus or SQLcl. The book introduces the optimizer, execution plans and statistics.
Which Oracle versions does it cover?
It covers 19c through 26ai, with appendices for newer SQL syntax, Vector and JSON Relational Duality. Some features depend on the version and edition. Check the requirements of each chapter before running the labs.
What files do I receive?
A Thai-language PDF eBook and lab setup scripts (.zip). An English edition of the eBook is not currently available.
How do I download it again later?
After payment, a download link is sent to your purchase email. To return later, use the download page and the same email to request a verification code. Check your spam folder if needed.
Is the PDF watermarked? Are downloads limited?
Your purchase email is marked on every PDF page except the cover. You can download the PDF 5 times; lab script downloads are unlimited.
Can I just read the book?
You can read for understanding. To see how the numbers and plans change, I recommend installing the included lab and running the examples in each chapter.
Oracle 26ai SQL Tuning
Ready to start tuning SQL
step by step?
PDF language: Thai 173 pages with lab scripts