agensgraph icon indicating copy to clipboard operation
agensgraph copied to clipboard

Serious performance issue - update inherited label data with multiple properties will cause return very very slow even hang in there

Open kadinwu opened this issue 3 weeks ago • 0 comments

**when trying to update one inherted label data named test_appl which has about 20 inherited labels. If only update one property,

Below is the query explain analyze result for two query the first one is one update query with 8 properties, the second one is one update query with 8 property, can find the plan time different is huge, and if update more properties will cause query hang in there:**

EXPLAIN ANALYZE MATCH (o:test_appl) WHERE id(o) = 209.1 SET o.name = 'Customer Portal Application', o.product = 'Customer Portal', o.version = '2.5.1', o.tcp_port = '8080,8443', o.used_for = 'Production', o.component = 'Web Application', o.publisher = 'Internal IT', o.created_by = 'admin' RETURN id(o), label(o), properties(o);
                                                                                                  QUERY PLAN                                                                                                   
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Subquery Scan on _agens_default_s  (cost=0.14..664.16 rows=70 width=72) (actual time=0.668..0.669 rows=1 loops=1)
   ->  Graph Set eager  (cost=0.14..663.28 rows=70 width=0) (actual time=0.665..0.665 rows=1 loops=1)
         ->  Result  (cost=0.14..663.28 rows=70 width=32) (actual time=0.126..0.644 rows=1 loops=1)
               ->  Append  (cost=0.14..528.71 rows=70 width=71) (actual time=0.021..0.529 rows=1 loops=1)
                     ->  Index Scan using test_appl_pkey on test_appl o  (cost=0.14..8.16 rows=1 width=548) (actual time=0.021..0.021 rows=1 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_web_application_pkey on test_web_application o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Seq Scan on test_vm o  (cost=0.00..7.50 rows=1 width=338) (actual time=0.021..0.021 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                           Rows Removed by Filter: 120
                     ->  Index Scan using test_vcenter_pkey on test_vcenter o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_oracle_asm_pkey on test_oracle_asm o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Seq Scan on test_lb_appl o  (cost=0.00..0.00 rows=1 width=46) (actual time=0.002..0.002 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                     ->  Seq Scan on test_infra_service o  (cost=0.00..0.00 rows=1 width=46) (actual time=0.002..0.002 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                     ->  Seq Scan on test_exchange_service_component o  (cost=0.00..0.00 rows=1 width=46) (actual time=0.001..0.001 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                     ->  Seq Scan on test_db_instance o  (cost=0.00..7.50 rows=1 width=361) (actual time=0.016..0.016 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                           Rows Removed by Filter: 120
                     ->  Index Scan using test_cloud_function_pkey on test_cloud_function o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_application_server_resource_pkey on test_application_server_resource o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_sharepoint_pkey on test_appl_sharepoint o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.020..0.020 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_sap_system_pkey on test_appl_sap_system o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_sap_server_pkey on test_appl_sap_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_rabbitmq_pkey on test_appl_rabbitmq o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_ora_tnslsnr_pkey on test_appl_ora_tnslsnr o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_now_app_pkey on test_appl_now_app o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.016..0.016 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_msmq_pkey on test_appl_msmq o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_ibm_wmq_pkey on test_appl_ibm_wmq o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_fastsearch_pkey on test_appl_fastsearch o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_citrix_xenapp_pkey on test_appl_citrix_xenapp o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)     
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_biztalk_pkey on test_appl_biztalk o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_ai_application_pkey on test_appl_ai_application o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.015..0.015 rows=0 loops=1)   
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_active_directory_pkey on test_appl_active_directory o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_hp_utest_pkey on test_app_server_hp_utest o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)   
                           Index Cond: (id = '209.1'::graphid)
                     ->  Seq Scan on test_app_server o  (cost=0.00..7.50 rows=1 width=380) (actual time=0.016..0.016 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                           Rows Removed by Filter: 120
                     ->  Seq Scan on test_api_gateway o  (cost=0.00..0.00 rows=1 width=46) (actual time=0.001..0.001 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                     ->  Index Scan using test_apache_active_mq_pkey on test_apache_active_mq o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_vm_vmware_pkey on test_vm_vmware o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.016..0.016 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_vm_parallels_pkey on test_vm_parallels o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_kvm_pkey on test_kvm o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_lb_nginx_pkey on test_lb_nginx o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_lb_haproxy_pkey on test_lb_haproxy o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_lb_f5_pkey on test_lb_f5 o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Seq Scan on test_web_server o  (cost=0.00..7.50 rows=1 width=347) (actual time=0.014..0.014 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                           Rows Removed by Filter: 120
                     ->  Index Scan using test_infra_service_ldap_pkey on test_infra_service_ldap o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.016..0.016 rows=0 loops=1)     
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_ftp_server_pkey on test_ftp_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_email_server_ent_vault_pkey on test_email_server_ent_vault o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_email_server_pkey on test_email_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_mailbox_server_pkey on test_exchange_mailbox_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_hub_transport_server_pkey on test_exchange_hub_transport_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.014..0.014 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_hub_pkey on test_exchange_hub o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_frontend_pkey on test_exchange_frontend o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_edge_transport_server_pkey on test_exchange_edge_transport_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_cas_pkey on test_exchange_cas o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_backend_pkey on test_exchange_backend o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.014..0.014 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_postgresql_instance_pkey on test_db_postgresql_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_ora_instance_pkey on test_db_ora_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_mysql_instance_pkey on test_db_mysql_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_mssql_instance_pkey on test_db_mssql_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_mongodb_instance_pkey on test_db_mongodb_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.013..0.013 rows=0 loops=1)   
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_hbase_instance_pkey on test_db_hbase_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_db2_instance_pkey on test_db_db2_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Seq Scan on test_cloud_database o  (cost=0.00..0.00 rows=1 width=46) (actual time=0.002..0.002 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                     ->  Index Scan using test_cassandra_instance_pkey on test_cassandra_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)     
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_glassfish_pkey on test_appl_glassfish o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_websphere_pkey on test_app_server_websphere o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.015..0.015 rows=0 loops=1) 
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_weblogic_pkey on test_app_server_weblogic o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)   
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_tomcat_pkey on test_app_server_tomcat o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_ora_ias_pkey on test_app_server_ora_ias o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)     
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_ora_ess_pkey on test_app_server_ora_ess o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)     
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_jboss_pkey on test_app_server_jboss o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.016..0.016 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_kong_gateway_pkey on test_kong_gateway o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_ibm_api_connect_pkey on test_ibm_api_connect o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_azure_api_mgmt_pkey on test_azure_api_mgmt o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_aws_api_gateway_pkey on test_aws_api_gateway o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_nginx_web_server_pkey on test_nginx_web_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.016..0.016 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_microsoft_iis_web_server_pkey on test_microsoft_iis_web_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_apache_web_server_pkey on test_apache_web_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_aws_redshift_pkey on test_aws_redshift o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.004..0.004 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
 Planning Time: 428.837 ms
 Execution Time: 2.163 ms
(150 rows)
         
Time: 771.082 ms
test=# 
test=# 
test=# EXPLAIN ANALYZE MATCH (o:test_appl) WHERE id(o) = 209.1 SET o.name = 'Customer Portal Applicationd' RETURN id(o), label(o), properties(o);
                                                                                                  QUERY PLAN                                                                                                   
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Subquery Scan on _agens_default_s  (cost=0.14..530.81 rows=70 width=72) (actual time=0.603..0.604 rows=1 loops=1)
   ->  Graph Set eager  (cost=0.14..529.94 rows=70 width=0) (actual time=0.597..0.598 rows=1 loops=1)
         ->  Result  (cost=0.14..529.94 rows=70 width=32) (actual time=0.050..0.584 rows=1 loops=1)
               ->  Append  (cost=0.14..528.71 rows=70 width=71) (actual time=0.029..0.553 rows=1 loops=1)
                     ->  Index Scan using test_appl_pkey on test_appl o  (cost=0.14..8.16 rows=1 width=548) (actual time=0.028..0.029 rows=1 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_web_application_pkey on test_web_application o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.009..0.009 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Seq Scan on test_vm o  (cost=0.00..7.50 rows=1 width=338) (actual time=0.021..0.021 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                           Rows Removed by Filter: 120
                     ->  Index Scan using test_vcenter_pkey on test_vcenter o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_oracle_asm_pkey on test_oracle_asm o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Seq Scan on test_lb_appl o  (cost=0.00..0.00 rows=1 width=46) (actual time=0.002..0.002 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                     ->  Seq Scan on test_infra_service o  (cost=0.00..0.00 rows=1 width=46) (actual time=0.001..0.001 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                     ->  Seq Scan on test_exchange_service_component o  (cost=0.00..0.00 rows=1 width=46) (actual time=0.003..0.003 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                     ->  Seq Scan on test_db_instance o  (cost=0.00..7.50 rows=1 width=361) (actual time=0.016..0.016 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                           Rows Removed by Filter: 120
                     ->  Index Scan using test_cloud_function_pkey on test_cloud_function o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_application_server_resource_pkey on test_application_server_resource o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.009..0.009 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_sharepoint_pkey on test_appl_sharepoint o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_sap_system_pkey on test_appl_sap_system o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_sap_server_pkey on test_appl_sap_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.012..0.012 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_rabbitmq_pkey on test_appl_rabbitmq o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.008..0.008 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_ora_tnslsnr_pkey on test_appl_ora_tnslsnr o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_now_app_pkey on test_appl_now_app o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_msmq_pkey on test_appl_msmq o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.008..0.008 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_ibm_wmq_pkey on test_appl_ibm_wmq o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_fastsearch_pkey on test_appl_fastsearch o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.008..0.008 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_citrix_xenapp_pkey on test_appl_citrix_xenapp o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)     
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_biztalk_pkey on test_appl_biztalk o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_ai_application_pkey on test_appl_ai_application o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)   
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_active_directory_pkey on test_appl_active_directory o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_hp_utest_pkey on test_app_server_hp_utest o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.010..0.010 rows=0 loops=1)   
                           Index Cond: (id = '209.1'::graphid)
                     ->  Seq Scan on test_app_server o  (cost=0.00..7.50 rows=1 width=380) (actual time=0.017..0.017 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                           Rows Removed by Filter: 120
                     ->  Seq Scan on test_api_gateway o  (cost=0.00..0.00 rows=1 width=46) (actual time=0.001..0.001 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                     ->  Index Scan using test_apache_active_mq_pkey on test_apache_active_mq o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.008..0.008 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_vm_vmware_pkey on test_vm_vmware o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_vm_parallels_pkey on test_vm_parallels o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_kvm_pkey on test_kvm o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.010..0.010 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_lb_nginx_pkey on test_lb_nginx o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.009..0.009 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_lb_haproxy_pkey on test_lb_haproxy o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_lb_f5_pkey on test_lb_f5 o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Seq Scan on test_web_server o  (cost=0.00..7.50 rows=1 width=347) (actual time=0.016..0.016 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                           Rows Removed by Filter: 120
                     ->  Index Scan using test_infra_service_ldap_pkey on test_infra_service_ldap o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)     
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_ftp_server_pkey on test_ftp_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.016..0.016 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_email_server_ent_vault_pkey on test_email_server_ent_vault o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_email_server_pkey on test_email_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_mailbox_server_pkey on test_exchange_mailbox_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_hub_transport_server_pkey on test_exchange_hub_transport_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_hub_pkey on test_exchange_hub o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_frontend_pkey on test_exchange_frontend o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_edge_transport_server_pkey on test_exchange_edge_transport_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_cas_pkey on test_exchange_cas o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_exchange_backend_pkey on test_exchange_backend o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_postgresql_instance_pkey on test_db_postgresql_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.008..0.008 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_ora_instance_pkey on test_db_ora_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_mysql_instance_pkey on test_db_mysql_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_mssql_instance_pkey on test_db_mssql_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_mongodb_instance_pkey on test_db_mongodb_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.008..0.008 rows=0 loops=1)   
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_hbase_instance_pkey on test_db_hbase_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_db_db2_instance_pkey on test_db_db2_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Seq Scan on test_cloud_database o  (cost=0.00..0.00 rows=1 width=46) (actual time=0.002..0.002 rows=0 loops=1)
                           Filter: (id = '209.1'::graphid)
                     ->  Index Scan using test_cassandra_instance_pkey on test_cassandra_instance o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)     
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_appl_glassfish_pkey on test_appl_glassfish o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_websphere_pkey on test_app_server_websphere o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.009..0.009 rows=0 loops=1) 
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_weblogic_pkey on test_app_server_weblogic o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.012..0.012 rows=0 loops=1)   
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_tomcat_pkey on test_app_server_tomcat o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_ora_ias_pkey on test_app_server_ora_ias o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)     
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_ora_ess_pkey on test_app_server_ora_ess o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)     
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_app_server_jboss_pkey on test_app_server_jboss o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.009..0.009 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_kong_gateway_pkey on test_kong_gateway o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.008..0.008 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_ibm_api_connect_pkey on test_ibm_api_connect o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.009..0.009 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_azure_api_mgmt_pkey on test_azure_api_mgmt o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_aws_api_gateway_pkey on test_aws_api_gateway o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_nginx_web_server_pkey on test_nginx_web_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_microsoft_iis_web_server_pkey on test_microsoft_iis_web_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.006..0.006 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_apache_web_server_pkey on test_apache_web_server o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)       
                           Index Cond: (id = '209.1'::graphid)
                     ->  Index Scan using test_aws_redshift_pkey on test_aws_redshift o  (cost=0.15..8.17 rows=1 width=46) (actual time=0.005..0.005 rows=0 loops=1)
                           Index Cond: (id = '209.1'::graphid)
 Planning Time: 1.461 ms
 Execution Time: 1.312 ms
(150 rows)

Looks like the root cause is test_appl has many inherit labels, need a lot of plan time to handle inherit labels. This is serious performance issue for inherit labels sencario, could you help to give any suggestion or fix it? Thanks,

kadinwu avatar Dec 08 '25 01:12 kadinwu