You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by "AndBondStyle (via GitHub)" <gi...@apache.org> on 2023/01/26 22:10:05 UTC

[GitHub] [age] AndBondStyle commented on issue #628: Simple (a) -> (b) query taking up tens of minutes

AndBondStyle commented on issue #628:
URL: https://github.com/apache/age/issues/628#issuecomment-1405737137

   @jrgemignani wow, it helped a lot! Went down from 10 minutes to 400 ms :) However, I'm confused... aren't my and your query equivalent?
   
   <details>
     <summary>Explain analyze</summary>
     
     ```
   Nested Loop (cost=0.01..12880557423.00 rows=224000620600 width=96) (actual time=159.057..370.786 rows=20 loops=1)
   --
   Join Filter: age_match_vle_terminal_edge("V".id, "V2".id, _age_default_alias_0.edges)
   Rows Removed by Join Filter: 518440
   -> Nested Loop (cost=0.01..519562.85 rows=25923000 width=136) (actual time=158.984..211.086 rows=20 loops=1)
   -> Append (cost=0.00..1102.84 rows=25923 width=104) (actual time=0.027..3.970 rows=25923 loops=1)
   -> Seq Scan on _ag_label_vertex "V" (cost=0.00..5.96 rows=296 width=28) (actual time=0.025..0.063 rows=296 loops=1)
   -> Seq Scan on composite_provider "V_1" (cost=0.00..1.10 rows=10 width=95) (actual time=0.007..0.008 rows=10 loops=1)
   -> Seq Scan on column_table "V_2" (cost=0.00..616.78 rows=18978 width=103) (actual time=0.003..1.608 rows=18978 loops=1)
   -> Seq Scan on column_view "V_3" (cost=0.00..181.71 rows=3571 width=101) (actual time=0.020..0.391 rows=3571 loops=1)
   -> Seq Scan on "table" "V_4" (cost=0.00..27.52 rows=652 width=112) (actual time=0.006..0.064 rows=652 loops=1)
   -> Seq Scan on transformation_rule "V_5" (cost=0.00..42.45 rows=645 width=154) (actual time=0.003..0.074 rows=645 loops=1)
   -> Seq Scan on view "V_6" (cost=0.00..18.42 rows=542 width=105) (actual time=0.003..0.046 rows=542 loops=1)
   -> Seq Scan on dtp "V_7" (cost=0.00..5.85 rows=85 width=117) (actual time=0.011..0.019 rows=85 loops=1)
   -> Seq Scan on cv_hana "V_8" (cost=0.00..5.76 rows=76 width=129) (actual time=0.003..0.010 rows=76 loops=1)
   -> Seq Scan on transport_request "V_9" (cost=0.00..15.62 rows=262 width=98) (actual time=0.004..0.030 rows=262 loops=1)
   -> Seq Scan on sheet "V_10" (cost=0.00..4.91 rows=91 width=117) (actual time=0.003..0.011 rows=91 loops=1)
   -> Seq Scan on trigger "V_11" (cost=0.00..2.31 rows=31 width=110) (actual time=0.010..0.013 rows=31 loops=1)
   -> Seq Scan on transformation_bw "V_12" (cost=0.00..3.49 rows=49 width=120) (actual time=0.003..0.008 rows=49 loops=1)
   -> Seq Scan on pc_variant "V_13" (cost=0.00..4.72 rows=72 width=107) (actual time=0.003..0.010 rows=72 loops=1)
   -> Seq Scan on cds "V_14" (cost=0.00..1.07 rows=7 width=107) (actual time=0.003..0.004 rows=7 loops=1)
   -> Seq Scan on master_data "V_15" (cost=0.00..9.87 rows=287 width=96) (actual time=0.005..0.029 rows=287 loops=1)
   -> Seq Scan on first_source "V_16" (cost=0.00..4.50 rows=50 width=102) (actual time=0.003..0.009 rows=50 loops=1)
   -> Seq Scan on dso "V_17" (cost=0.00..1.15 rows=15 width=94) (actual time=0.003..0.004 rows=15 loops=1)
   -> Seq Scan on dataflow "V_18" (cost=0.00..1.11 rows=11 width=134) (actual time=0.002..0.003 rows=11 loops=1)
   -> Seq Scan on workflow "V_19" (cost=0.00..3.79 rows=79 width=132) (actual time=0.004..0.011 rows=79 loops=1)
   -> Seq Scan on info_package "V_20" (cost=0.00..2.34 rows=34 width=118) (actual time=0.002..0.005 rows=34 loops=1)
   -> Seq Scan on job "V_21" (cost=0.00..1.17 rows=17 width=130) (actual time=0.003..0.004 rows=17 loops=1)
   -> Seq Scan on process_chain "V_22" (cost=0.00..2.30 rows=30 width=107) (actual time=0.003..0.006 rows=30 loops=1)
   -> Seq Scan on system "V_23" (cost=0.00..1.01 rows=1 width=108) (actual time=0.006..0.006 rows=1 loops=1)
   -> Seq Scan on info_source "V_24" (cost=0.00..1.13 rows=13 width=100) (actual time=0.002..0.003 rows=13 loops=1)
   -> Seq Scan on function "V_25" (cost=0.00..1.12 rows=12 width=109) (actual time=0.002..0.003 rows=12 loops=1)
   -> Seq Scan on role "V_26" (cost=0.00..1.01 rows=1 width=113) (actual time=0.020..0.021 rows=1 loops=1)
   -> Seq Scan on schema "V_27" (cost=0.00..1.02 rows=2 width=95) (actual time=0.003..0.003 rows=2 loops=1)
   -> Seq Scan on graph "V_28" (cost=0.00..1.01 rows=1 width=112) (actual time=0.002..0.002 rows=1 loops=1)
   -> Seq Scan on report "V_29" (cost=0.00..1.01 rows=1 width=106) (actual time=0.003..0.003 rows=1 loops=1)
   -> Seq Scan on term "V_30" (cost=0.00..1.01 rows=1 width=106) (actual time=0.005..0.005 rows=1 loops=1)
   -> Seq Scan on cube "V_31" (cost=0.00..1.01 rows=1 width=97) (actual time=0.004..0.004 rows=1 loops=1)
   -> Function Scan on age_vle _age_default_alias_0 (cost=0.01..10.01 rows=1000 width=32) (actual time=0.008..0.008 rows=0 loops=25923)
   -> Materialize (cost=0.00..1232.46 rows=25923 width=104) (actual time=0.002..2.946 rows=25923 loops=20)
   -> Append (cost=0.00..1102.84 rows=25923 width=104) (actual time=0.007..3.467 rows=25923 loops=1)
   -> Seq Scan on _ag_label_vertex "V2" (cost=0.00..5.96 rows=296 width=28) (actual time=0.006..0.026 rows=296 loops=1)
   -> Seq Scan on composite_provider "V2_1" (cost=0.00..1.10 rows=10 width=95) (actual time=0.003..0.004 rows=10 loops=1)
   -> Seq Scan on column_table "V2_2" (cost=0.00..616.78 rows=18978 width=103) (actual time=0.003..1.392 rows=18978 loops=1)
   -> Seq Scan on column_view "V2_3" (cost=0.00..181.71 rows=3571 width=101) (actual time=0.004..0.320 rows=3571 loops=1)
   -> Seq Scan on "table" "V2_4" (cost=0.00..27.52 rows=652 width=112) (actual time=0.004..0.057 rows=652 loops=1)
   -> Seq Scan on transformation_rule "V2_5" (cost=0.00..42.45 rows=645 width=154) (actual time=0.003..0.068 rows=645 loops…
   -> Seq Scan on view "V2_6" (cost=0.00..18.42 rows=542 width=105) (actual time=0.003..0.049 rows=542 loops=1)
   -> Seq Scan on dtp "V2_7" (cost=0.00..5.85 rows=85 width=117) (actual time=0.004..0.013 rows=85 loops=1)
   -> Seq Scan on cv_hana "V2_8" (cost=0.00..5.76 rows=76 width=129) (actual time=0.004..0.011 rows=76 loops=1)
   -> Seq Scan on transport_request "V2_9" (cost=0.00..15.62 rows=262 width=98) (actual time=0.004..0.029 rows=262 loops=1)
   -> Seq Scan on sheet "V2_10" (cost=0.00..4.91 rows=91 width=117) (actual time=0.007..0.015 rows=91 loops=1)
   -> Seq Scan on trigger "V2_11" (cost=0.00..2.31 rows=31 width=110) (actual time=0.003..0.005 rows=31 loops=1)
   -> Seq Scan on transformation_bw "V2_12" (cost=0.00..3.49 rows=49 width=120) (actual time=0.003..0.008 rows=49 loops=1)
   -> Seq Scan on pc_variant "V2_13" (cost=0.00..4.72 rows=72 width=107) (actual time=0.002..0.010 rows=72 loops=1)
   -> Seq Scan on cds "V2_14" (cost=0.00..1.07 rows=7 width=107) (actual time=0.004..0.005 rows=7 loops=1)
   -> Seq Scan on master_data "V2_15" (cost=0.00..9.87 rows=287 width=96) (actual time=0.003..0.025 rows=287 loops=1)
   -> Seq Scan on first_source "V2_16" (cost=0.00..4.50 rows=50 width=102) (actual time=0.003..0.008 rows=50 loops=1)
   -> Seq Scan on dso "V2_17" (cost=0.00..1.15 rows=15 width=94) (actual time=0.002..0.003 rows=15 loops=1)
   -> Seq Scan on dataflow "V2_18" (cost=0.00..1.11 rows=11 width=134) (actual time=0.005..0.006 rows=11 loops=1)
   -> Seq Scan on workflow "V2_19" (cost=0.00..3.79 rows=79 width=132) (actual time=0.002..0.009 rows=79 loops=1)
   -> Seq Scan on info_package "V2_20" (cost=0.00..2.34 rows=34 width=118) (actual time=0.002..0.005 rows=34 loops=1)
   -> Seq Scan on job "V2_21" (cost=0.00..1.17 rows=17 width=130) (actual time=0.004..0.005 rows=17 loops=1)
   -> Seq Scan on process_chain "V2_22" (cost=0.00..2.30 rows=30 width=107) (actual time=0.005..0.008 rows=30 loops=1)
   -> Seq Scan on system "V2_23" (cost=0.00..1.01 rows=1 width=108) (actual time=0.004..0.004 rows=1 loops=1)
   -> Seq Scan on info_source "V2_24" (cost=0.00..1.13 rows=13 width=100) (actual time=0.002..0.003 rows=13 loops=1)
   -> Seq Scan on function "V2_25" (cost=0.00..1.12 rows=12 width=109) (actual time=0.002..0.003 rows=12 loops=1)
   -> Seq Scan on role "V2_26" (cost=0.00..1.01 rows=1 width=113) (actual time=0.005..0.005 rows=1 loops=1)
   -> Seq Scan on schema "V2_27" (cost=0.00..1.02 rows=2 width=95) (actual time=0.003..0.003 rows=2 loops=1)
   -> Seq Scan on graph "V2_28" (cost=0.00..1.01 rows=1 width=112) (actual time=0.002..0.002 rows=1 loops=1)
   -> Seq Scan on report "V2_29" (cost=0.00..1.01 rows=1 width=106) (actual time=0.002..0.002 rows=1 loops=1)
   -> Seq Scan on term "V2_30" (cost=0.00..1.01 rows=1 width=106) (actual time=0.005..0.005 rows=1 loops=1)
   -> Seq Scan on cube "V2_31" (cost=0.00..1.01 rows=1 width=97) (actual time=0.006..0.006 rows=1 loops=1)
   Planning Time: 2.121 ms
   JIT:
   Functions: 14
   Options: Inlining true, Optimization true, Expressions true, Deforming true
   Timing: Generation 1.060 ms, Inlining 58.088 ms, Optimization 52.239 ms, Emission 30.395 ms, Total 141.783 ms
   Execution Time: 401.137 ms
     ```
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org