diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-06 02:29:23 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-06 02:29:23 +0000 |
| commit | cb8b6618cefa1f87197390ae12709b46f5137a35 (patch) | |
| tree | 6180b2eed06fe60c41ef34e88e672743b0fdb046 /src/backend/access/nbtree/nbtsearch.c | |
| parent | b5aad11a1b253bbd45405dc926f1ebef90f8f28c (diff) | |
| download | postgresql-cb8b6618cefa1f87197390ae12709b46f5137a35.tar.gz | |
Revise pgstats stuff to fix the problems with not counting accesses
generated by bitmap index scans. Along the way, simplify and speed up
the code for counting sequential and index scans; it was both confusing
and inefficient to be taking care of that in the per-tuple loops, IMHO.
initdb forced because of internal changes in pg_stat view definitions.
Diffstat (limited to 'src/backend/access/nbtree/nbtsearch.c')
| -rw-r--r-- | src/backend/access/nbtree/nbtsearch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c index 42bd6574aa..c029824fa6 100644 --- a/src/backend/access/nbtree/nbtsearch.c +++ b/src/backend/access/nbtree/nbtsearch.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.93 2005/06/19 22:41:00 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.94 2005/10/06 02:29:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -17,6 +17,7 @@ #include "access/genam.h" #include "access/nbtree.h" +#include "pgstat.h" #include "utils/lsyscache.h" @@ -501,6 +502,8 @@ _bt_first(IndexScanDesc scan, ScanDirection dir) int i; StrategyNumber strat_total; + pgstat_count_index_scan(&scan->xs_pgstat_info); + /* * Examine the scan keys and eliminate any redundant keys; also * discover how many keys must be matched to continue the scan. |
