Ihar Hancharenka ad571a8ca6 m
2025-03-05 11:19:45 +03:00

137 строки
6.6 KiB
Plaintext

2023
PostgresProfessional - DBA2 Administration of 18 parts
https://www.youtube.com/playlist?list=PLaFqU3KCWw6L72nIqJ-l-pscc6WxtW4G1
PostgresProfessional - RogovLuzanovTolmachyov - QPT13 - Query Optimization of p12
https://postgrespro.ru/education/courses/QPT
https://www.youtube.com/playlist?list=PLaFqU3KCWw6JW80WBHPOe-SMJD2NOjmge
p10 - profiling 0:00 of 37:49
https://www.youtube.com/watch?v=o5T0ApVFcDc
p9 - Statistics of 46:28
https://www.youtube.com/watch?v=I4cedjshRrs
! pg_class - num of tuples/pages (reltuples/relpages) for tables
! setting default_statistics_target = 100
! "selection size" for table analysis
! pg_stats - n_distinct, null_tract - ration of uniq vals
! most_common_vals, most_common_freqs
! pg_statistics_ext, pg_statistics_ext_data, pg_stats_ext view (for dependent column values)
p8 - Merge Join of 24:26
https://www.youtube.com/watch?v=urerHBMGc14
! set should be sorted first (either from downstream node of plan or from idx)
! Merge Join: ...
! Merge Cond: ...
! 18:00 Sort:
! Sort Key:
! Sort Method:
! Buffers: ...
! 20:00 Agg...
! Gather Merge:...
p7 - Hash Join of 29:03
https://www.youtube.com/watch?v=zH_LJAsYvcU
! can be in a single (Batches: 1) or double-batches (when can't feet into RAM)
! 3:00 work_mem * hash_mem_multiplier
! 5:00 Hash Join
! Hash Cond: (... = ...)
! -> Seq Scan on <tbl> alias
! -> Hash
! -> Seq Scan on ...
! Hash Full Join
! 7:00 hash joing can be used for DISTINCT
! Hash Aggregate ...
! Group Key ...
! explain (analyze, settings - to show all non-std param-values, ... )
!
! hash-table need to be build my lower set of rows (to decrease RAM usage)
! 12:00
! Hash Cond:
! Join Filter: ...
! 13:00 - double-batches (not feet into RAM, use tmp-files)
! 17:00 Hash (...)
! Buckets: ... Batches: 4 ...
! Buffers: ..., temp written=5217
p6 - Inner Loop Join of 20:35
https://www.youtube.com/watch?v=VeGJAQo9ogM
! Bitmap Index Scan
! Heap Blocks: exact=4413 (we have enough RAM)
! ... lossy=3989 (non-precise fragments, contains links to table segments for re-check)
! !! set/reset workmem
! 4:00 select a.title, s.name
! from albums a join songs s on a.id = s.a_id;
! Nested Loop - node of plan
! 12:00 select * from aircrafts a left join seats s on (a.aircraft_code = s.aircraft_code) where a.model like '...';
! Nested Loop Left Join - node of plan
! 19:00 nested-loop-join is effective on middle/sized cardinality only (for big ones need index)
! + join can be done on anly condition
p5 - Bitmap Scan 0:00 of 25:57
https://www.youtube.com/watch?v=j7e7EANyJhE
p4 - Inex Scan of 41:10
https://www.youtube.com/watch?v=iu35dYTchu4
! 8:00 select current_setting('random_page_cost'); -> 4
! !!! need to decrease in case of ssd-disks
! current_setting
! 'random_page_cost'
! 'seq_page_cost'
! 'cpu_tuple_cost'
! 'cpu_index_tuple_cost'
! 'cpu_operator_cost'
! 18:00 - other params
! min_parallel_index_scan_size
! ...per_...
! 26:00 - create index ... include(...)
! 33:00 - duplicate index records
! 34:30 - pg has dup-idx-records exclusion mechanism (works only upon index-page-split)
! create index ... with(deduplicate_items=off) -- to switchi it off
! 37:00 - set enable_seqscan = off; -- to temporary disable seqscan
p3 - Sequential Scan of 47:06
https://www.youtube.com/watch?v=X2DOIf0DfJ0
! parallel processing is not-efficitent for full seq-load, but is effective for the case of agg-n
! "Parallel Seq Scan" -> "Partial Aggregate" -> "Gather"
! 34:00 set max_parallel_workers_per_gather = 5;
! 46:00 "post_parallel_mode" - allows to check whether query can be paral-d in principle
p2 - Query Execution of 43:14
https://www.youtube.com/watch?v=_6ce4YFFScc
! 26:00 - set jit = off;
! prepare model(varchar) as select model from aircrafts where iircraft_code = $1;
! select * from pg_prepared_systems;
! deallocate ... (or just close session)
! 27:00 - declare c cursor for select * from aircrafts;
! fetch c; ... close c;
p1 - Air Demobase of 30:07
https://www.youtube.com/watch?v=k9cloEiIPC0
p0 - Intro of 8:49
https://www.youtube.com/watch?v=2-UmottNWWk
2022
PostgresProfessional - Hacking PostgreSQL of p8
https://www.youtube.com/playlist?list=PLaFqU3KCWw6Jfb8IBNk3hZ07dxMxjfGtv
! need to look
2021
PostgresProfessional - Rogov - DEV2 of 21 videos
https://www.youtube.com/playlist?list=PLaFqU3KCWw6K3AyBVcZGdXMtM2xvjHA1N
https://postgrespro.ru/education/courses/DEV2
PostgresProfessional - Rogov - Luzanov - Bashtaev - DBA1 Administration of 19 parts
https://www.youtube.com/playlist?list=PLaFqU3KCWw6LPcuYVymLcXl3muC45mu3e
https://postgrespro.ru/education/courses/DBA1
2019
PostgresProfessional - DBA3 Administration of 9 parts
https://www.youtube.com/playlist?list=PLaFqU3KCWw6KEakTSrRWrekNI-z9U1ypF
https://postgrespro.ru/education/courses/DBA3
PostgresProfessional - DBA2 Administration of 18 parts
https://www.youtube.com/playlist?list=PLaFqU3KCWw6KycrRthIC6mESoLLQen1k6
https://postgrespro.ru/education/courses/DBA2
PostgresProfessional - DBA1 Administration of 19 parts
https://www.youtube.com/playlist?list=PLaFqU3KCWw6KycrRthIC6mESoLLQen1k6
PostgresProfessional - Rogov - Luzanov - DBA1 Administration of 19 parts
https://www.youtube.com/playlist?list=PLaFqU3KCWw6JhHBp07QSu9uE8zahhKnTn
https://postgrespro.ru/education/courses/DBA1
Morgunov - sqlprimer
https://www.youtube.com/playlist?list=PLaFqU3KCWw6J1NEI8hjYlvGnD4Y7Sxx4r
https://postgrespro.ru/education/university/sqlprimer
https://edu.postgrespro.ru/sqlprimer/sqlprimer-2019-msu-03.pdf
https://edu.postgrespro.ru/sqlprimer/sqlprimer-2019-msu-04.pdf
Novikov
https://edu.postgrespro.ru/dbtech/
https://www.youtube.com/playlist?list=PLaFqU3KCWw6K5maTyTF2NdcbpNsPHRecu
2018
PostgresProfessional - Rogov - Luzanov - DEV1 of 21 videos
https://www.youtube.com/playlist?list=PLaFqU3KCWw6LNR1IZ814whJe89J1tRQ3t
https://postgrespro.ru/education/courses/DEV1