Custom vs generic plan | Postgres.FM 096 |

  Рет қаралды 258

PostgresTV 💙💛

PostgresTV 💙💛

Күн бұрын

[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT+manually! You can also try KZbin's auto-translation of them from English to your language; try it and share it with people interested in Postgres!]
Nikolay and Michael discuss custom and generic planning in prepared statements - how it works, how issues can present themselves, some ways to view the generic plan, and some benefits of avoiding planning (not just time).
Here are some links to things they mentioned:
* PREPARE www.postgresql.org/docs/curre...
* track_activity_query_size www.postgresql.org/docs/curre...
* plan_cache_mode www.postgresql.org/docs/curre...
* EXPLAIN (GENERIC_PLAN) www.postgresql.org/docs/curre...
* EXPLAIN (GENERIC_PLAN) in PostgreSQL 16 (blog post by Laurenz from Cybertec) www.cybertec-postgresql.com/e...
* Running EXPLAIN on any query, even with $1 parameters (blog post and video by Lukas Fittl of pganalyze) pganalyze.com/blog/5mins-post...
* EXPLAIN from pg_stat_statements, how to get the generic plan (blog post by Franck Pashto of Yugabyte) dev.to/yugabyte/explain-from-...
* Rework query relation permission checking (commit by Amit Langote) git.postgresql.org/gitweb/pos...
* Partition pruning, prepared statements and generic vs custom query plans (a follow up blog post and video by Lukas) pganalyze.com/blog/5mins-post...
* Our episode on over-indexing (inc LWLock discussion) postgres.fm/episodes/over-ind...
* “The year of the lock manager’s revenge” (from blog post by Jeremy Schneider) ardentperf.com/2024/03/03/pos...
~~~
What did you like or not like? What should we discuss next time? Let us know in the comments, or by tweeting us on @postgresfm / postgresfm , @samokhvalov / samokhvalov and @michristofides / michristofides
~~~
Postgres FM is brought to you by:
- Nikolay Samokhvalov, founder of Postgres.ai postgres.ai/
- Michael Christofides, founder of pgMustard pgmustard.com/
~~~
This is the video version. Check out postgres.fm to subscribe to the audio-only version, to see the transcript, guest profiles, and more.

Пікірлер: 2
@pdougall1
@pdougall1 2 ай бұрын
Ya'll are great! Its really important to hear professional db people talking about how all of this works in practice. Beyond a basic explanation that can be found in books (books are also really important btw)
@kirkwolak6735
@kirkwolak6735 2 ай бұрын
So, I was wondering... Wouldn't it be nice if there were 2-3 types of plans based on some of the values of the parameters, so you get the most optimum plan and maybe the optimizer does Parameter Peeking to determine which of the X plans to choose... And then I realized. Wow... The application could do this. Create 3 prepared statements for the same query. And execute against the one TUNED for the query parameter types forcing the best plan to be used by design... Hmmm... We have this situation. We have a complicated search. But when the value we are searching for is small (lots of hits) vs large (few hits). It wants to choose the wrong one after a few queries and then a switch. Unfortunately, this is inside of a Procedure where the statement is prepared around us. We would have to basically duplicate the complex query just to make the condition so that it executes the right right way. But I might still try that.
Minor releases | Postgres.FM 097 | #PostgreSQL #Postgres podcast
39:46
PostgresTV 💙💛
Рет қаралды 232
Don't do this | Postgres.FM 091 | #PostgreSQL #Postgres podcast
44:31
PostgresTV 💙💛
Рет қаралды 572
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 18 МЛН
Gym belt !! 😂😂  @kauermotta
00:10
Tibo InShape
Рет қаралды 18 МЛН
Event-Driven Architecture (EDA) vs Request/Response (RR)
12:00
Confluent
Рет қаралды 132 М.
Buffers II (the sequel) | Postgres.FM 094 | #PostgreSQL #Postgres podcast
36:13
EP03 - AI Impact on Renters (tenants) and Landlords
39:08
Search | Postgres.FM 090 | #PostgreSQL #Postgres podcast
41:32
PostgresTV 💙💛
Рет қаралды 375
LIMIT vs  performance | Postgres.FM 095 | #PostgreSQL #Postgres podcast
45:23
80 Year Olds Share Advice for Younger Self
12:22
Sprouht
Рет қаралды 1,7 МЛН
PostgreSQL Indexing : How, why, and when.
31:21
PyCon AU
Рет қаралды 76 М.
Sponsoring the community | Postgres.FM 099 | #PostgreSQL #Postgres podcast
32:17
Hacking Postgres with Andrey, Kirk, and Nikolay
1:26:12
PostgresTV 💙💛
Рет қаралды 406
tom with Jerry 😱 #funny
0:12
Nemi Shorts
Рет қаралды 19 МЛН
Waka Waka 💦💃😁 #funnyshorts #rianashow
0:14
RianaShow
Рет қаралды 18 МЛН
family is everything 🥺❤️ #shorts
0:16
Pop it GO
Рет қаралды 15 МЛН
Мировой Рекорд по Засыпанию (@DazByron )
0:30
Голову Сломал
Рет қаралды 11 МЛН