Академический Документы
Профессиональный Документы
Культура Документы
Capacitacin Nivel 1
Da 3
Agenda
Configuracin
Transacciones y bloqueos.
Control de concurrencia.
Catalogo. Estadsticas.
Entendiendo el Explain.
Administracin de ndices.
Archivos de configuracin
PG_VERSON
Otros Ficheros:
Base
Bases de datos y plantillas (Template0 y 1). Dentro se
encuentran las tablas e indices con sus
correspondientes ODs.
Global
pg_log
pg_xlog (WAL):
pg_clog
Ficheros de confirmacin
pg_multixact
pg_twophase
pg_subtrans
pg_tblspc
General
shared_buffers
max_connections
temp_buffers
work_mem
max_fsm_pages y max_fsm_relations
WAL
Fsync
wal_buffers
archive_mode archive_command
postgresql.conf (2)
Query Tuning
Geqo
Runtime statistics
track_activities, log_parser_stats,
log_planner_stats, log_statement_stats, etc.
postgresql.conf (3)
Bloqueos
deadlock_timeout
max_locks_per_transaction
tener en cuenta que cada bloqueo consume ~270
bytes del shared_buffer por lo que existen
max_locks_per_transaction * (max_connections +
max_prepared_transactions)
pg_hba.conf
Lectura sucia
Lectura no repetida
Lectura fantasma
Coste
Operador
Seq Scan
ndex scan
Sort (*work_mem)
Unique
Limit
Aggregate
Append
Result
Nested Loop
Merge Join
Group
Materialize
EXPLAN vs EXPLAN ANALYZE
+ operadores
select *
from accounts a, history h
where a.aid = h.aid;
Manipulando el optimizador
Comunes
Por expresion o
funcionales
CREATE NDEX ix_accounts1 ON accounts
USNG hash (aid) tablespace ts_indices;
CREATE NDEX ix_accounts1 ON accounts
USNG hash (aid) tablespace ts_indices;
ndices funcionales
CREATE NDEX ix_chares_func ON chares
(hashtext(texto));
ncidencia de NULLs en ndices
parapruebas$% update chares set te&to $ N'LL (here te&to ) *+,-,./.01*2
Performance
RAD si o si en servidores.
explain.depesz.com
</Da 3>
Gracias!