Prev | Current Page 256 | Next

Brad Ediger

"Advanced Rails"

48..199.59 rows=7 width=12)
-> Bitmap Heap Scan on cluster_ancestors (cost=6.22..198.86 rows=62 width=12)
Recheck Cond: ((listing_id = 16466) OR (listing_id = 18320) OR
(listing_id = 17948))
-> BitmapOr (cost=6.22..6.22 rows=62 width=0)
-> Bitmap Index Scan on cluster_ancestors_listing_id_and_level_idx
(cost=0.00..2.07 rows=21 width=0)
Index Cond: (listing_id = 16466)
-> Bitmap Index Scan on cluster_ancestors_listing_id_and_level_idx
(cost=0.00..2.07 rows=21 width=0)
Index Cond: (listing_id = 18320)
-> Bitmap Index Scan on cluster_ancestors_listing_id_and_level_idx
(cost=0.00..2.07 rows=21 width=0)
Index Cond: (listing_id = 17948)
(10 rows)
The different indentation levels form a tree showing how the data is retrieved from
the table and aggregated into a result. Each operation shows a cost estimate, which is
roughly related to the number of disk blocks that must be accessed for that operation.
The first cost number is the estimated cost to calculate the first row; the second
number is the cost to calculate all of the rows. Each step also lists the estimated number
of rows returned from that step, as well as the average width, in bytes, of each
row. The preceding tree represents the following execution plan (in chronological
order):
1. The cluster_ancestors_listing_id_and_level index is scanned for each of the
three listing_id values in the WHERE clause. This is an inexpensive scan because
it is restricted based on a subset of the index.


Pages:
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268