High-Performance PostgreSQL Applications

High-Performance PostgreSQL Applications


Get the most out of PostgreSQL

Want to run your PostgreSQL application at high speeds?

  • 1
    PostgreSQL Essentials
    PostgreSQL is a multi-purpose relational database system, whose popularity has been steadily growing over the past two decades. According to the 2024 StackOverflow Survey, 51% of professional developers now use PostgreSQL. Being such a popular option for many database applications, it’s of paramount importance to make sure we are getting the best out of it.
  • 2
    High-Performance SQL
    SQL has come a long way since SQL:92. This training teaches you many useful features like Window Functions, Lateral Joins, Recursive Common Table Expressions, Merge, Upsert, JSON operations, that will help you write better queries to address complex data access requirements.
  • 3
    DESIGN FOR PERFORMANCE
    When designing the database tables, you have to choose the right column types and indexes to get the best performance out of your SQL queries. In this training, I'm going to show you how to design your database schema to get the best out of PostgreSQL.

Curriculum

The High-Performance PostgreSQL Applications training is aimed to level up your team's database skills, so that they can take better decisions when designing and implementing a PostgreSQL application.

Day 1

Introduction

Duration: 30m

  • PostgreSQL history and evolution
  • Why PostgreSQL became such a popular database option?

Database modeling

Duration: 1h

  • Choosing compact column types
  • Column Tetris
  • Primary Key options (numerical vs. UUID)
  • Table relationships (one-to-many, one-to-one, many-to-many)
  • Indexes (B+Tree, Hash, GIN)

SQL Essentials

Duration: 2h

  • Beyond SQL:92
  • Logical operation ordering
  • JOIN options (Cartesian, Inner, Outer, Lateral)
  • Subqueries and semi-join optimization
  • Derived Tables, CTE (Common Table Expressions)

PostgreSQL Architecture

Duration: 30m

  • Storage engine, shared buffers, OS cache
  • Connection management and pooling

Logging and monitoring

Duration: 1h

  • Logging SQL statements
  • Slow query log
  • Execution plans
  • Auto explain
  • pg_stat_io, pg_stat_statements, pg_stat_all_tables, and pg_stat_all_indexes

Advanced SQL

Duration: 2h

  • Recursive CTE
  • Window Functions
  • Pivot
  • Upsert and Merge

Day 2

Transactions and Concurrency Control

Duration: 4h

  • Race conditions
  • ACID
  • Phenomena
    • Dirty Write,
    • Dirty Read,
    • Non-Repeatable Read,
    • Phantom Read,
    • Read Skew,
    • Write Skew,
    • Lost Updates
  • 2PL (Two-Phase Locking)
  • MVCC (Multi-Version Concurrency Control)
  • Isolation levels
  • Explicit locking (shared, exclusive, advisory locks)
  • SKIP_LOCKED and NOWAIT
  • Optimistic locking

Batching and Statement Caching

Duration: 1h 30m

  • Statement vs. PreparedStatement batching
  • SQL injection
  • JDBC batching for INSERT, UPDATE, and DELETE
  • Statement lifecycle
  • Statement caching

Pagination and projections

Duration: 1h 30m

  • Offset pagination
  • Keyset pagination
  • Streaming
  • Projection best practices

What People Are Saying...

Andrei Rosu-Cojocaru

Andrei RoΘ™u-Cojocaru

Software Developer - ABS Laundry Business Solutions

Our company has been delivering an ERP solution for laundries for more than 25 years. Our application uses Oracle, Java, Spring, and JDBC as its backbone.

Most of the performance problems reported by our customers find their root cause in the persistence layer. During his course, Vlad showed us how we should tackle these kinds of issues, breaking up the execution time of a statement into atomic bits and improving the performance for each of them. We found that optimizing the persistence layer is much more than just writing an SQL query as efficiently as possible. The framework allows for a lot of configuration we were not aware of, even in our case, where we are using plain JDBC. There are also some other architectural decisions that might have an amazing impact on the speed, such as caching, batching, or fetching options.

I enjoyed the fact that Vlad successfully managed to deliver custom training tailored to our needs. He had no problem adjusting the content, as he immediately understood our application’s architecture. Although his course contains a lot of information on various DBMSs, such as SQL Server, PostgreSQL, and MySQL (also comparing their performances) and on frameworks such as Hibernate, he focused on the technologies we are currently using and provided a lot of tips and tricks to help us tune our data access layer. The information was delivered at a pace that could be followed by all participants, and he promptly answered all our questions.

The course was delivered online - given the pandemic situation – and we had a very good interaction, with our colleagues being involved in the discussion through periodical Q&A or hands-on exercises.

Vlad offers a repository with an impressive library of integration tests that illustrate each concept presented throughout the course. Given the level of abstraction they provide and the way they were written, using the latest version of Java, taking gain of the latest additions in the JDK, and abiding by the clean code standards, it would not be an exaggeration to say they provide state of the art in this domain. Every developer writing tests should take a look at them to make sure the application is checked for most hidden vulnerabilities.

I highly recommend the High-Performance SQL and Java Persistence Trainings delivered by Vlad for all companies that want to make sure the data management solution in their application is put to proper use!

Vasile Mihali

Software Architect - AROBS

As a senior architect for enterprise systems, I was drawn to data persistence. So, for over a decade, I stayed in touch with SQL capabilities. It's funny how, in order to find out how much you don't know, you have to be exposed to more knowledgeable people. For me, after having Vlad in our company to deliver a high-level workshop, my previous feeling of being connected to SQL soon shifted to realizing that I've been only scratching the surface when it comes to SQL.

 

The feedback from our colleagues was diverse, varying from "the next level of SQL", "great examples with real application use-cases", to "wow, can SQL do that?", and "we should give more time to analyzing SQL queries in our projects since data growth can lead to performance issues".

SQL, as any programming language has evolved, both conceptually and practically. Vlad's training presented all these new SQL standard features in a way that was understandable and applicable for every colleague of ours, regardless of their programming language or the SQL database system they are currently using.

Daniel Manolescu

Java Developer - Societe Generale European Business Services

As a Java developer, I often find myself interacting with databases and writing SQL queries. After attending Vlad's High-Performance SQL, I found answers to many problems that I faced over the years.

Vlad has a dynamic approach to teaching that motivates and engages everybody in the room. The presentation covered a lot of fascinating topics, and the content was well structured.

Every section had real-life code examples helping solidify the information presented.

This was a great training course that covered a lot of advanced SQL concepts.

Fit to your needs

There is no limit of students that can enroll in this training. If you have multiple teams that need to attend it, the cheaper it gets per person.

The full training takes 2 days, but it can also be adapted to a 1-day workshop. We can arrange the agenda to cover exactly what you need.

The source code will be provided along with a training participation certificate.




Contact me

Let me teach you how to run your data access layer at high speeds!


If you want to book an on-site training session, you should email me at vlad@vladmihalcea.com

and discuss it in more detail.

← Back

Thank you for your response. ✨

More Testimonials


Viva Credit, Romania

Voxxed Days, Bucharest