pistos2

Change label
Query Plan as raw text
Summary
Time Node
Node (ms) Percent
32487.721 100.00%
 Sort (cost=140.97..140.98 rows=4 width=207) (actual time=32487.715..32487.721 rows=3 loops=1)
   Sort Key: view__domain_tldproducts.duration, productregioncost.cost
   InitPlan
0.858 0.00%
     -> Subquery Scan view__domain_tldproducts (cost=12.95..12.96 rows=1 width=0) (actual time=0.853..0.858 rows=1 loops=1)
0.848 0.00%
           -> Sort (cost=12.95..12.95 rows=1 width=93) (actual time=0.847..0.848 rows=1 loops=1)
                 Sort Key: tldproducts.tld, tldproducts.purchasetype, productdetails.duration
0.830 0.00%
                 -> Nested Loop (cost=0.0..12.94 rows=1 width=93) (actual time=0.167..0.830 rows=1 loops=1)
0.803 0.00%
                       -> Nested Loop (cost=0.0..7.49 rows=1 width=81) (actual time=0.147..0.803 rows=1 loops=1)
0.724 0.00%
                             -> Seq Scan on tldproducts (cost=0.0..1.95 rows=1 width=19) (actual time=0.075..0.724 rows=1 loops=1)
                                   Filter: (((tld)::text = (func__common__tld_from_domainname('sunonthesand.com'::character varying))::text) AND ((purchasetype)::text = 'intro'::text))
0.068 0.00%
                             -> Index Scan using productdesc_pkey on productdesc (cost=0.0..5.53 rows=1 width=62) (actual time=0.065..0.068 rows=1 loops=1)
                                   Index Cond: ("outer".productid = productdesc.productid)
0.013 0.00%
                       -> Index Scan using productdetails_pkey on productdetails (cost=0.0..5.44 rows=1 width=20) (actual time=0.011..0.013 rows=1 loops=1)
                             Index Cond: ("outer".productid = productdetails.productid)
0.858 0.00%
     -> Subquery Scan view__domain_tldproducts (cost=12.95..12.96 rows=1 width=16) (actual time=0.854..0.858 rows=1 loops=1)
0.852 0.00%
           -> Sort (cost=12.95..12.95 rows=1 width=93) (actual time=0.850..0.852 rows=1 loops=1)
                 Sort Key: tldproducts.tld, tldproducts.purchasetype, productdetails.duration
0.832 0.00%
                 -> Nested Loop (cost=0.0..12.94 rows=1 width=93) (actual time=0.166..0.832 rows=1 loops=1)
0.808 0.00%
                       -> Nested Loop (cost=0.0..7.49 rows=1 width=81) (actual time=0.150..0.808 rows=1 loops=1)
0.720 0.00%
                             -> Seq Scan on tldproducts (cost=0.0..1.95 rows=1 width=19) (actual time=0.070..0.720 rows=1 loops=1)
                                   Filter: (((tld)::text = (func__common__tld_from_domainname('sunonthesand.com'::character varying))::text) AND ((purchasetype)::text = 'intro'::text))
0.075 0.00%
                             -> Index Scan using productdesc_pkey on productdesc (cost=0.0..5.53 rows=1 width=62) (actual time=0.071..0.075 rows=1 loops=1)
                                   Index Cond: ("outer".productid = productdesc.productid)
0.011 0.00%
                       -> Index Scan using productdetails_pkey on productdetails (cost=0.0..5.44 rows=1 width=20) (actual time=0.008..0.011 rows=1 loops=1)
                             Index Cond: ("outer".productid = productdetails.productid)
32487.689 100.00%
   -> Hash Join (cost=29.61..115.0 rows=4 width=207) (actual time=21878.633..32487.689 rows=3 loops=1)
         Hash Cond: ("outer".productid = "inner".productid)
         Join Filter: CASE WHEN ((subplan) AND (subplan)) THEN (("inner".purchasetype)::text = 'free'::text) WHEN $2 THEN ((("inner".purchasetype)::text = 'intro'::text) OR ((("inner". purchasetype)::text = 'new'::text) AND ("inner".duration <> $3))) ELSE (("inner".purchasetype)::text = 'new'::text) END
1.019 0.00%
         -> Nested Loop (cost=5.67..18.48 rows=154 width=29) (actual time=0.156..1.019 rows=155 loops=1)
0.102 0.00%
               -> Nested Loop (cost=0.0..7.03 rows=1 width=19) (actual time=0.071..0.102 rows=1 loops=1)
                     Join Filter: ("inner".regioncurrencyid = "outer".regioncurrencyid)
0.062 0.00%
                     -> Index Scan using members_pkey on members (cost=0.0..5.9 rows=1 width=8) (actual time=0.059..0.062 rows=1 loops=1)
                           Index Cond: (memberid = 2756918)
0.017 0.00%
                     -> Seq Scan on regioncurrency (cost=0.0..1.06 rows=6 width=11) (actual time=0.004..0.017 rows=6 loops=1)
0.430 0.00%
               -> Bitmap Heap Scan on productregioncost (cost=5.67..10.46 rows=79 width=18) (actual time=0.078..0.430 rows=155 loops=1)
                     Recheck Cond: (productregioncost.regioncurrencyid = "outer".regioncurrencyid)
0.071 0.00%
                     -> Bitmap Index Scan on productregioncost_pkey (cost=0.0..5.67 rows=79 width=0) (actual time=0.071..0.071 rows=155 loops=1)
                           Index Cond: (productregioncost.regioncurrencyid = "outer".regioncurrencyid)
3.049 0.01%
         -> Hash (cost=23.94..23.94 rows=5 width=190) (actual time=3.049..3.049 rows=8 loops=1)
3.031 0.01%
               -> Subquery Scan view__domain_tldproducts (cost=23.87..23.94 rows=5 width=190) (actual time=2.994..3.031 rows=8 loops=1)
3.001 0.01%
                     -> Sort (cost=23.87..23.89 rows=5 width=93) (actual time=2.990..3.001 rows=8 loops=1)
                           Sort Key: tldproducts.tld, tldproducts.purchasetype, productdetails.duration
2.957 0.01%
                           -> Hash Join (cost=13.94..23.82 rows=5 width=93) (actual time=2.415..2.957 rows=8 loops=1)
                                 Hash Cond: ("outer".productid = "inner".productid)
0.581 0.00%
                                 -> Seq Scan on productdesc (cost=0.0..8.22 rows=322 width=62) (actual time=0.003..0.581 rows=322 loops=1)
1.850 0.01%
                                 -> Hash (cost=13.92..13.92 rows=5 width=39) (actual time=1.850..1.850 rows=8 loops=1)
1.830 0.01%
                                       -> Hash Join (cost=1.82..13.92 rows=5 width=39) (actual time=0.864..1.830 rows=8 loops=1)
                                             Hash Cond: ("outer".productid = "inner".productid)
0.597 0.00%
                                             -> Seq Scan on productdetails (cost=0.0..7.22 rows=322 width=20) (actual time=0.003..0.597 rows=322 loops=1)
0.708 0.00%
                                             -> Hash (cost=1.81..1.81 rows=5 width=19) (actual time=0.708..0.708 rows=8 loops=1)
0.686 0.00%
                                                   -> Seq Scan on tldproducts (cost=0.0..1.81 rows=5 width=19) (actual time=0.059..0.686 rows=8 loops=1)
                                                         Filter: ((tld)::text = (func__common__tld_from_domainname('sunonthesand.com'::character varying))::text)
         SubPlan
32480.472 99.98%
           -> Result (cost=0.0..0.01 rows=1 width=0) (actual time=4060.057..4060.059 rows=1 loops=8)
0.984 0.00%
           -> Nested Loop (cost=12.95..17.92 rows=1 width=0) (actual time=0.115..0.123 rows=1 loops=8)
0.712 0.00%
                 -> Sort (cost=12.95..12.95 rows=1 width=93) (actual time=0.087..0.089 rows=1 loops=8)
                       Sort Key: tldproducts.tld, tldproducts.purchasetype, productdetails.duration
0.676 0.00%
                       -> Nested Loop (cost=0.0..12.94 rows=1 width=93) (actual time=0.126..0.676 rows=1 loops=1)
0.660 0.00%
                             -> Nested Loop (cost=0.0..7.49 rows=1 width=81) (actual time=0.116..0.660 rows=1 loops=1)
0.640 0.00%
                                   -> Seq Scan on tldproducts (cost=0.0..1.95 rows=1 width=19) (actual time=0.103..0.640 rows=1 loops=1)
                                         Filter: (((tld)::text = (func__common__tld_from_domainname('sunonthesand.com'::character varying))::text) AND ((purchasetype)::text = 'free'::t ext))
0.009 0.00%
                                   -> Index Scan using productdesc_pkey on productdesc (cost=0.0..5.53 rows=1 width=62) (actual time=0.007..0.009 rows=1 loops=1)
                                         Index Cond: ("outer".productid = productdesc.productid)
0.008 0.00%
                             -> Index Scan using productdetails_pkey on productdetails (cost=0.0..5.44 rows=1 width=20) (actual time=0.006..0.008 rows=1 loops=1)
                                   Index Cond: ("outer".productid = productdetails.productid)
0.176 0.00%
                 -> Index Scan using productregioncost_pkey on productregioncost prodcost (cost=0.0..4.94 rows=1 width=4) (actual time=0.020..0.022 rows=1 loops=8)
                       Index Cond: ((prodcost.productid = "outer".productid) AND (prodcost.regioncurrencyid = $0))