0% found this document useful (0 votes)
44 views

Sqlfordevscom Next Level Database Techniques For Developers 1 4

This document provides a table of contents for a book on database optimization techniques. The book is divided into sections on data manipulation, querying data, schema design, and indexes. Each section lists chapter topics covering things like updating rows, filtering queries, data modeling patterns, and index usage. The introduction explains that the book collects the author's tips on databases into a reference guide.

Uploaded by

Kumar SIVA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Sqlfordevscom Next Level Database Techniques For Developers 1 4

This document provides a table of contents for a book on database optimization techniques. The book is divided into sections on data manipulation, querying data, schema design, and indexes. Each section lists chapter topics covering things like updating rows, filtering queries, data modeling patterns, and index usage. The introduction explains that the book collects the author's tips on databases into a reference guide.

Uploaded by

Kumar SIVA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Table of Contents

Data Manipulation ............................................................................................................. 5

Prevent Lock Contention For Updates On Hot Rows ....................................................... 6

Updates Based On A Select Query ................................................................................. 7

Return The Values Of Modified Rows ............................................................................. 8

Delete Duplicate Rows ................................................................................................... 9

Table Maintenance After Bulk Modifications ................................................................ 10

Querying Data .................................................................................................................. 11

Reduce The Amount Of Group By Columns .................................................................. 12

Fill Tables With Large Amounts Of Test Data ............................................................... 13

Simplified Inequality Checks With Nullable Columns .................................................... 14

Prevent Division By Zero Errors ................................................................................... 15

Sorting Order With Nullable Columns ........................................................................... 16

Deterministic Ordering for Pagination .......................................................................... 17

More Efficient Pagination Than LIMIT OFFSET .............................................................. 18

Database-Backed Locks With Safety Guarantees ......................................................... 19

Refinement Of Data With Common Table Expressions ................................................. 20

First Row Of Many Similar Ones ................................................................................... 21

Multiple Aggregates In One Query ............................................................................... 22

Limit Rows Also Including Ties ..................................................................................... 23

Fast Row Count Estimates ............................................................................................ 24

Date-Based Statistical Queries With Gap-Filling ........................................................... 25

Table Joins With A For-Each Loop ................................................................................. 26

Schema ............................................................................................................................. 27

Rows Without Overlapping Dates ................................................................................. 28


Store Trees As Materialized Paths ................................................................................ 29

JSON Columns to Combine NoSQL and Relational Databases ...................................... 30

Alternative Tag Storage With JSON Arrays ................................................................... 31

Constraints for Improved Data Strictness .................................................................... 32

Validation Of JSON Colums Against A Schema ............................................................. 33

UUID Keys Against Enumeration Attacks ...................................................................... 35

Fast Delete Of Big Data With Partitions ........................................................................ 36

Pre-Sorted Tables For Faster Access ............................................................................ 37

Pre-Aggregation of Values for Faster Queries .............................................................. 38

Indexes .............................................................................................................................. 39

Indexes On Functions And Expressions ........................................................................ 40

Find Unused Indexes .................................................................................................... 41

Safely Deleting Unused Indexes ................................................................................... 42

Index-Only Operations By Including More Columns ..................................................... 43

Partial Indexes To Reduce Index Size ........................................................................... 44

Partial Indexes For Uniqueness Constraints ................................................................. 45

Index Support For Wildcard Searches .......................................................................... 46

Rules For Multi-Column Indexes ................................................................................... 47

Hash Indexes To Descrease Index Size ........................................................................ 48

Descending Indexes For Order By ................................................................................ 49

Ghost Conditions Against Unindexed Columns ............................................................ 50


In 2021 I started sharing database tips and tricks for developers that gained more and more
interest every time I shared something. As of now, thousands of developers are following me
to read my weekly database advice. This book was written to collect the best ones and make
them easier to look up for future reference. As time passes, I hope to have all these and
much more available in more detailed versions on SQLforDevs.com. Don't forget to
subscribe to the newsletter to be notified about new content.

This book is designed as a cookbook with many small independent recipes. You can skip
chapters or tips as you want to. In contrast to a whole book, the descriptions are all kept
short by design. You should be able to read it thoroughly in a single evening and start using
its ideas the next day.

I hope you learn a lot while reading it and level up your knowledge as planned. I really
appreciate hearing any feedback from you.

Have fun reading it.


Tobias Petry

You might also like