\list
\l
\connect database_name
\dt
\d table
\di
xmin
) and expiration transaction id (xmax
) for every tuple.EXPLAIN ANALYZE
SELECT Conference.name, University.name
FROM Conference
JOIN Participant ON (Conference.conference_id = Participant.conference_id)
JOIN Researcher ON (Participant.researcher_id = Researcher.researcher_id)
JOIN University ON (Researcher.university_id = University.university_id);
Get pg stats
SELECT attname, n_distinct
FROM pg_stats
WHERE tablename='my-table-name';
Update pg stats
analize;
Seq Scan
- последовательное сканированиеHash
- составление хэш таблицы (`key: values[])Hash Join
- join двух хэшированных таблиц