sysadmin:postgresql
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
sysadmin:postgresql [2015/02/12 08:57] – CREAZIONE E USO INDICI feroda | sysadmin:postgresql [2015/02/12 09:01] – Indice su espressione feroda | ||
---|---|---|---|
Line 106: | Line 106: | ||
| | ||
Total runtime: 46.523 ms (3 rows) | Total runtime: 46.523 ms (3 rows) | ||
+ | | ||
+ | ===== Se creo indice sull' | ||
+ | |||
+ | Niente .... :( | ||
+ | |||
+ | postgres=# CREATE INDEX ON " | ||
+ | CREATE INDEX | ||
+ | postgres=# REINDEX TABLE " | ||
+ | REINDEX | ||
+ | postgres=# EXPLAIN ANALYZE SELECT bcs.id, bcs.duration FROM acs_service.connection_session bcs WHERE bcs.duration IS NOT NULL; | ||
+ | QUERY PLAN | ||
+ | ------------------------------------------------------------------------------------------------------------------------------- | ||
+ | Seq Scan on connection_session bcs (cost=0.00..2829.90 rows=149220 width=20) (actual time=0.011..38.323 rows=149226 loops=1) | ||
+ | | ||
+ | Total runtime: 48.491 ms | ||
+ | (3 rows) | ||
+ | |||
+ | postgres=# EXPLAIN ANALYZE SELECT bcs.id, bcs.duration FROM acs_service.connection_session bcs WHERE bcs.duration IS NULL; | ||
+ | QUERY PLAN | ||
+ | ------------------------------------------------------------------------------------------------------------------------------------------ | ||
+ | | ||
+ | | ||
+ | | ||
+ | Index Cond: (duration IS NULL) | ||
+ | Total runtime: 0.148 ms | ||
+ | (5 rows) | ||
+ | |||
====== Occupazione disco ====== | ====== Occupazione disco ====== |