| Time |
Node |
| Node (ms) |
Percent |
| 567651.761 |
100.00% |
¶ |
GroupAggregate (cost=63010824.26..63010884.6 rows=862 width=30) (actual time=567643.763..567651.761 rows=7 loops=1)
InitPlan
|
| 372.526 |
0.07% |
¶ |
-> Aggregate (cost=12951.93..12951.94 rows=1 width=11) (actual time=372.525..372.526 rows=1 loops=1)
|
| 249.460 |
0.04% |
¶ |
-> Seq Scan on customer (cost=0.0..12916.68 rows=4700 width=11) (actual time=6.677..249.460 rows=38120 loops=1)
Filter: ((c_acctbal > 0.00) AND ("substring"((c_phone)::text, 1, 2) = ANY ('{13,31,23,29,30,18,17}'::text[])))
|
| 567644.223 |
100.00% |
¶ |
-> Sort (cost=62997872.32..62997878.78 rows=862 width=30) (actual time=567642.452..567644.223 rows=6384 loops=1)
Sort Key: "substring"((customer.c_phone)::text, 1, 2)
|
| 567613.590 |
99.99% |
¶ |
-> Index Scan using customer_1_idx on customer (cost=0.0..62997746.23 rows=862 width=30) (actual time=1225.859..567613.590 rows=6384 loops=1)
Index Cond: (c_acctbal > $0)
Filter: (("substring"((c_phone)::text, 1, 2) = ANY ('{13,31,23,29,30,18,17}'::text[])) AND (NOT (subplan)))
SubPlan
|
| 566865.000 |
99.86% |
¶ |
-> Index Scan using orders_1_idx on orders (cost=0.0..22674.46 rows=18 width=124) (actual time=29.835..29.835 rows=1 loops=19000)
Index Cond: (o_custkey = $1)
|
ANALYZEto update the server's statistics.EXPLAINand interpreting its output, see the Postgres documentation, in particular theEXPLAINandANALYZEreferences pages, and Using Explain.