# Result: 1hV

options
Did it help? Consider supporting us.
# exclusive inclusive rows x rows loops node
1. 0.083 2,824.323 ↓ 31.0 31 1

(cost=54,080.40..54,080.41 rows=1 width=68) (actual time=2,824.307..2,824.323 rows=31 loops=1)

• Sort Key: po.datetime
2. 1.047 2,824.240 ↓ 31.0 31 1

(cost=45,688.38..54,080.39 rows=1 width=68) (actual time=1,402.678..2,824.240 rows=31 loops=1)

• Join Filter: (("inner".merch_id = "outer".merch_id) AND ("outer".prod_id = "inner".prod_id) AND ("inner".mydate = "outer".mydate))
3. 124.011 309.868 ↓ 31.0 31 1

(cost=16,911.67..23,972.60 rows=1 width=36) (actual time=204.167..309.868 rows=31 loops=1)

• Hash Cond: (("outer".merch_id = "inner".merch_id) AND ("outer".prod_id = "inner".prod_id) AND ("outer".datetime = "inner".date))
4. 128.364 128.364 ↓ 1.0 174,447 1

Seq Scan on t_price_order po (cost=0.00..4,498.37 rows=170,837 width=28) (actual time=0.005..128.364 rows=174,447 loops=1)

5. 0.033 57.493 ↑ 1.4 31 1

(cost=16,911.34..16,911.34 rows=44 width=24) (actual time=57.493..57.493 rows=31 loops=1)

6. 0.034 57.460 ↑ 1.4 31 1

Subquery Scan b (cost=16,910.13..16,911.34 rows=44 width=24) (actual time=57.400..57.460 rows=31 loops=1)

7. 17.216 57.426 ↑ 1.4 31 1

(cost=16,910.13..16,910.90 rows=44 width=20) (actual time=57.398..57.426 rows=31 loops=1)

8. 26.490 40.210 ↑ 9.7 16,277 1

(cost=19.54..15,330.13 rows=158,000 width=20) (actual time=0.752..40.210 rows=16,277 loops=1)

• Join Filter: ("outer".datetime <= (('2012-04-01'::date + "inner".n) + '18:00:00'::time without time zone))
9. 0.647 2.640 ↓ 1.2 554 1

(cost=6.04..1,491.63 rows=474 width=16) (actual time=0.729..2.640 rows=554 loops=1)

10. 0.004 0.449 ↑ 1.0 1 1

(cost=0.00..47.80 rows=1 width=8) (actual time=0.414..0.449 rows=1 loops=1)

11. 0.017 0.017 ↑ 1.0 1 1

Index Scan using t_merchant_pkey on t_merchant m (cost=0.00..5.89 rows=1 width=4) (actual time=0.016..0.017 rows=1 loops=1)

• Index Cond: (merch_id = 34)
12. 0.428 0.428 ↑ 1.0 1 1

Seq Scan on tx_merch_prod mp (cost=0.00..41.89 rows=1 width=8) (actual time=0.395..0.428 rows=1 loops=1)

• Filter: ((prod_id = 1) AND (merch_id = 34))
13. 1.344 1.544 ↓ 1.2 554 1

Bitmap Heap Scan on t_price_order po (cost=6.04..1,439.09 rows=474 width=16) (actual time=0.311..1.544 rows=554 loops=1)

• Recheck Cond: (merch_id = 34)
• Filter: (prod_id = 1)
14. 0.200 0.200 ↓ 1.6 938 1

Bitmap Index Scan on ix_merch_id (cost=0.00..6.04 rows=584 width=0) (actual time=0.200..0.200 rows=938 loops=1)

• Index Cond: (merch_id = 34)
15. 11.047 11.080 ↑ 32.3 31 554

(cost=13.50..23.50 rows=1,000 width=4) (actual time=0.001..0.020 rows=31 loops=554)

16. 0.033 0.033 ↑ 32.3 31 1

Function Scan on generate_series x (cost=0.00..12.50 rows=1,000 width=4) (actual time=0.014..0.033 rows=31 loops=1)

17. 668.143 2,513.325 ↓ 3.1 31 31

(cost=28,776.71..30,107.61 rows=10 width=48) (actual time=80.856..81.075 rows=31 loops=31)

• Merge Cond: (("outer".prod_id = "inner".prod_id) AND ("outer".site_id = "inner".site_id) AND ("outer".datetime = "inner".date))
18. 1,442.337 1,702.520 ↑ 3.9 34,201 31

(cost=19,718.61..20,049.78 rows=132,467 width=48) (actual time=32.660..54.920 rows=34,201 loops=31)

• Sort Key: pc.prod_id, pc.site_id, pc.datetime
19. 140.930 260.183 ↑ 1.0 132,452 1

(cost=1.02..3,478.80 rows=132,467 width=48) (actual time=0.383..260.183 rows=132,452 loops=1)

20. 0.004 0.014 ↓ 0.0 0 1

Bitmap Heap Scan on tx_prices pc (cost=1.02..7.50 rows=3 width=48) (actual time=0.014..0.014 rows=0 loops=1)

• Recheck Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
21. 0.010 0.010 ↓ 0.0 0 1

Bitmap Index Scan on "cluster" (cost=0.00..1.02 rows=3 width=0) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
22. 0.002 0.006 ↓ 0.0 0 1

Bitmap Heap Scan on tx_prices_yy09mm08 pc (cost=1.02..7.50 rows=3 width=48) (actual time=0.006..0.006 rows=0 loops=1)

• Recheck Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
23. 0.004 0.004 ↓ 0.0 0 1

Bitmap Index Scan on tx_prices_yy09mm08_datetime (cost=0.00..1.02 rows=3 width=0) (actual time=0.004..0.004 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
24. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy09mm09_datetime on tx_prices_yy09mm09 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
25. 0.008 0.008 ↓ 0.0 0 1

Index Scan using tx_prices_yy09mm10_datetime on tx_prices_yy09mm10 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.008..0.008 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
26. 0.008 0.008 ↓ 0.0 0 1

Index Scan using tx_prices_yy09mm11_datetime on tx_prices_yy09mm11 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.008..0.008 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
27. 0.009 0.009 ↓ 0.0 0 1

Index Scan using tx_prices_yy09mm12_datetime on tx_prices_yy09mm12 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.009..0.009 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
28. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm01_datetime on tx_prices_yy10mm01 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
29. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm02_datetime on tx_prices_yy10mm02 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
30. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm03_datetime on tx_prices_yy10mm03 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
31. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm04_datetime on tx_prices_yy10mm04 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
32. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm05_datetime on tx_prices_yy10mm05 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
33. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm06_datetime on tx_prices_yy10mm06 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
34. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm07_datetime on tx_prices_yy10mm07 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
35. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm08_datetime on tx_prices_yy10mm08 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
36. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm09_datetime on tx_prices_yy10mm09 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
37. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm10_datetime on tx_prices_yy10mm10 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
38. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm11_datetime on tx_prices_yy10mm11 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
39. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm12_datetime on tx_prices_yy10mm12 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
40. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm01_datetime on tx_prices_yy11mm01 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
41. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm02_datetime on tx_prices_yy11mm02 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
42. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm03_datetime on tx_prices_yy11mm03 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
43. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm04_datetime on tx_prices_yy11mm04 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
44. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm05_datetime on tx_prices_yy11mm05 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
45. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm06_datetime on tx_prices_yy11mm06 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
46. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm07_datetime on tx_prices_yy11mm07 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
47. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm08_datetime on tx_prices_yy11mm08 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
48. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm09_datetime on tx_prices_yy11mm09 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
49. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm10_datetime on tx_prices_yy11mm10 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
50. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm11_datetime on tx_prices_yy11mm11 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
51. 0.009 0.009 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm12_datetime on tx_prices_yy11mm12 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.009..0.009 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
52. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy12mm01_datetime on tx_prices_yy12mm01 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
53. 0.019 0.019 ↓ 0.0 0 1

Index Scan using tx_prices_yy12mm02_datetime on tx_prices_yy12mm02 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.019..0.019 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
54. 0.009 0.009 ↓ 0.0 0 1

Index Scan using yy12mm03 on tx_prices_yy12mm03 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.009..0.009 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
55. 118.882 118.882 ↓ 1.0 132,452 1

Seq Scan on tx_prices_yy12mm04 pc (cost=0.00..3,359.78 rows=132,426 width=27) (actual time=0.007..118.882 rows=132,452 loops=1)

• Filter: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
56. 0.018 0.018 ↓ 0.0 0 1

Index Scan using tx_prices_yy12mm05_datetime on tx_prices_yy12mm05 pc (cost=0.00..3.02 rows=1 width=27) (actual time=0.018..0.018 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
57. 0.002 0.008 ↓ 0.0 0 1

Bitmap Heap Scan on tx_prices_yy12mm06 pc (cost=1.02..7.50 rows=3 width=48) (actual time=0.008..0.008 rows=0 loops=1)

• Recheck Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
58. 0.006 0.006 ↓ 0.0 0 1

Bitmap Index Scan on cluster1206 (cost=0.00..1.02 rows=3 width=0) (actual time=0.006..0.006 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
59. 0.630 142.662 ↑ 19.8 31 31

(cost=9,058.10..9,059.63 rows=613 width=28) (actual time=4.584..4.602 rows=31 loops=31)

• Sort Key: b.prod_id, b.site_id, b.date
60. 0.037 142.032 ↑ 19.8 31 1

Subquery Scan b (cost=9,012.86..9,029.72 rows=613 width=28) (actual time=141.972..142.032 rows=31 loops=1)

61. 2.084 141.995 ↑ 19.8 31 1

(cost=9,012.86..9,023.59 rows=613 width=24) (actual time=141.968..141.995 rows=31 loops=1)

62. 4.337 139.911 ↑ 22.5 2,081 1

(cost=87.50..8,426.91 rows=46,876 width=24) (actual time=4.539..139.911 rows=2,081 loops=1)

• Join Filter: ("outer".datetime <= (('2012-04-01'::date + "inner".n) + '18:00:00'::time without time zone))
63. 24.702 133.396 ↑ 1.2 121 1

(cost=74.00..4,301.53 rows=141 width=20) (actual time=4.510..133.396 rows=121 loops=1)

• Hash Cond: ("outer".site_id = "inner".site_id)
64. 43.157 107.072 ↑ 1.0 40,821 1

(cost=2.28..3,807.23 rows=42,102 width=16) (actual time=0.398..107.072 rows=40,821 loops=1)

65. 0.004 0.020 ↓ 0.0 0 1

Bitmap Heap Scan on tx_prices pc (cost=2.28..6.11 rows=1 width=16) (actual time=0.020..0.020 rows=0 loops=1)

• Recheck Cond: ((prod_id = 1) AND (datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
66. 0.001 0.016 ↓ 0.0 0 1

BitmapAnd (cost=2.28..2.28 rows=1 width=0) (actual time=0.016..0.016 rows=0 loops=1)

67. 0.015 0.015 ↓ 0.0 0 1

Bitmap Index Scan on tx_prices_prod_id (cost=0.00..1.01 rows=3 width=0) (actual time=0.015..0.015 rows=0 loops=1)

• Index Cond: (prod_id = 1)
68. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on "cluster" (cost=0.00..1.02 rows=3 width=0) (never executed)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
69. 0.002 0.006 ↓ 0.0 0 1

Bitmap Heap Scan on tx_prices_yy09mm08 pc (cost=2.28..6.11 rows=1 width=16) (actual time=0.006..0.006 rows=0 loops=1)

• Recheck Cond: ((prod_id = 1) AND (datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
70. 0.001 0.004 ↓ 0.0 0 1

BitmapAnd (cost=2.28..2.28 rows=1 width=0) (actual time=0.004..0.004 rows=0 loops=1)

71. 0.003 0.003 ↓ 0.0 0 1

Bitmap Index Scan on tx_prices_prod_id_0908 (cost=0.00..1.01 rows=3 width=0) (actual time=0.003..0.003 rows=0 loops=1)

• Index Cond: (prod_id = 1)
72. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on tx_prices_yy09mm08_datetime (cost=0.00..1.02 rows=3 width=0) (never executed)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
73. 0.013 0.013 ↓ 0.0 0 1

Index Scan using tx_prices_yy09mm09_datetime on tx_prices_yy09mm09 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.013..0.013 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
74. 0.009 0.009 ↓ 0.0 0 1

Index Scan using tx_prices_yy09mm10_datetime on tx_prices_yy09mm10 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.009..0.009 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
75. 0.009 0.009 ↓ 0.0 0 1

Index Scan using tx_prices_yy09mm11_datetime on tx_prices_yy09mm11 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.009..0.009 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
76. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy09mm12_datetime on tx_prices_yy09mm12 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
77. 0.012 0.012 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm01_datetime on tx_prices_yy10mm01 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.012..0.012 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
78. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm02_datetime on tx_prices_yy10mm02 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
79. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm03_datetime on tx_prices_yy10mm03 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
80. 0.012 0.012 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm04_datetime on tx_prices_yy10mm04 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.012..0.012 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
81. 0.012 0.012 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm05_datetime on tx_prices_yy10mm05 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.012..0.012 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
82. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm06_datetime on tx_prices_yy10mm06 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
83. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm07_datetime on tx_prices_yy10mm07 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
84. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm08_datetime on tx_prices_yy10mm08 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
85. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm09_datetime on tx_prices_yy10mm09 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
86. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm10_datetime on tx_prices_yy10mm10 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
87. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm11_datetime on tx_prices_yy10mm11 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
88. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy10mm12_datetime on tx_prices_yy10mm12 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
89. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm01_datetime on tx_prices_yy11mm01 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
90. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm02_datetime on tx_prices_yy11mm02 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
91. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm03_datetime on tx_prices_yy11mm03 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
92. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm04_datetime on tx_prices_yy11mm04 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
93. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm05_datetime on tx_prices_yy11mm05 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
94. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm06_datetime on tx_prices_yy11mm06 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
95. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm07_datetime on tx_prices_yy11mm07 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
96. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm08_datetime on tx_prices_yy11mm08 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
97. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm09_datetime on tx_prices_yy11mm09 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
98. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm10_datetime on tx_prices_yy11mm10 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
99. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm11_datetime on tx_prices_yy11mm11 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
100. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy11mm12_datetime on tx_prices_yy11mm12 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
101. 0.010 0.010 ↓ 0.0 0 1

Index Scan using tx_prices_yy12mm01_datetime on tx_prices_yy12mm01 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.010..0.010 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
102. 0.011 0.011 ↓ 0.0 0 1

Index Scan using tx_prices_yy12mm02_datetime on tx_prices_yy12mm02 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.011..0.011 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
103. 0.009 0.009 ↓ 0.0 0 1

Index Scan using yy12mm03 on tx_prices_yy12mm03 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.009..0.009 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
104. 63.532 63.532 ↑ 1.0 40,821 1

Seq Scan on tx_prices_yy12mm04 pc (cost=0.00..3,690.91 rows=42,067 width=16) (actual time=0.012..63.532 rows=40,821 loops=1)

• Filter: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone) AND (prod_id = 1))
105. 0.017 0.017 ↓ 0.0 0 1

Index Scan using tx_prices_yy12mm05_datetime on tx_prices_yy12mm05 pc (cost=0.00..3.02 rows=1 width=16) (actual time=0.017..0.017 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
106. 0.002 0.008 ↓ 0.0 0 1

Bitmap Heap Scan on tx_prices_yy12mm06 pc (cost=1.02..7.51 rows=1 width=16) (actual time=0.008..0.008 rows=0 loops=1)

• Recheck Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
• Filter: (prod_id = 1)
107. 0.006 0.006 ↓ 0.0 0 1

Bitmap Index Scan on cluster1206 (cost=0.00..1.02 rows=3 width=0) (actual time=0.006..0.006 rows=0 loops=1)

• Index Cond: ((datetime <= '2012-05-01 00:00:00'::timestamp without time zone) AND (datetime >= '2012-04-01 00:00:00'::timestamp without time zone))
108. 0.003 1.622 ↑ 3.0 1 1

(cost=71.71..71.71 rows=3 width=16) (actual time=1.622..1.622 rows=1 loops=1)

109. 0.530 1.619 ↑ 3.0 1 1

(cost=7.54..71.71 rows=3 width=16) (actual time=1.575..1.619 rows=1 loops=1)

• Hash Cond: ("outer".site_id = "inner".site_id)
110. 1.053 1.053 ↓ 1.0 892 1

Seq Scan on t_site_products sp (cost=0.00..55.29 rows=886 width=8) (actual time=0.004..1.053 rows=892 loops=1)

• Filter: (prod_id = 1)
111. 0.008 0.036 ↓ 1.7 5 1

(cost=7.53..7.53 rows=3 width=8) (actual time=0.036..0.036 rows=5 loops=1)

112. 0.014 0.028 ↓ 1.7 5 1

Bitmap Heap Scan on tx_merch_site ms (cost=2.01..7.53 rows=3 width=8) (actual time=0.022..0.028 rows=5 loops=1)

• Recheck Cond: (merch_id = 34)
113. 0.014 0.014 ↓ 1.7 5 1

Bitmap Index Scan on tx_merch_comp_pkey (cost=0.00..2.01 rows=3 width=0) (actual time=0.014..0.014 rows=5 loops=1)

• Index Cond: (merch_id = 34)
114. 2.146 2.178 ↑ 32.3 31 121

(cost=13.50..23.50 rows=1,000 width=4) (actual time=0.001..0.018 rows=31 loops=121)

115. 0.032 0.032 ↑ 32.3 31 1

Function Scan on generate_series x (cost=0.00..12.50 rows=1,000 width=4) (actual time=0.016..0.032 rows=31 loops=1)