Comments - Why does this query hang on Maria but runs fine on MySQL?

4 years ago Peter Lindstrom

Thank you for the reply.

The version on my news CentOS 7 server is 10.3.24

Configs didn't start that way; but as a test, I copied the my.cnf from the (old) MySQL server to the new servers my.cnf. No impact.

Had never heard of EXPLAIN. The explain on MySQL is below. On Maria it never returns.

On a sql console app i use (Navicat); when running the explain on Maria i see a message generated (even though the query does not finish); and the message is just the query; but chopped off. Wondering if possibly Maria simply can't handle this long a query (which would seem very odd).

Yes, my next steps were to remove parts of the query until it works. This isn't my query. It is from a Drupal website; so one of the modules is creating this query. Drupal states it is compatible with Maria; but possibly not all the contributed modules are compatible with it.

Explain from MySQL: 1 PRIMARY field_reg_team_nodefield_data_taxonomy_vocabulary_8 ref PRIMARY,entity_type,deleted,entity_id,taxonomy_vocabulary_8_tid PRIMARY 386 const 1336 2 Using where 1 PRIMARY field_reg_team_nodefield_data_field_reg_user ref PRIMARY,entity_type,deleted,entity_id,field_reg_user_uid PRIMARY 391 const,ospredo.field_reg_team_nodefield_data_taxonomy_vocabulary_8.entity_id,const 1 100 Using where 1 PRIMARY node_field_data_field_match_team1field_data_field_reg_team ref entity_id,field_reg_team_nid entity_id 4 ospredo.field_reg_team_nodefield_data_taxonomy_vocabulary_8.entity_id 1 100 1 PRIMARY users_field_data_field_reg_userfield_data_field_game_reminder ref PRIMARY,entity_type,deleted,entity_id,field_game_reminder_value PRIMARY 391 const,ospredo.field_reg_team_nodefield_data_field_reg_user.field_reg_user_uid,const 1 10 Using where 1 PRIMARY field_data_field_match_team1 ref PRIMARY,entity_type,deleted,entity_id,field_match_team1_nid field_match_team1_nid 391 ospredo.node_field_data_field_match_team1field_data_field_reg_team.field_reg_team_nid,const 10 10 Using where; Using index 1 PRIMARY field_data_field_match_datetime ref PRIMARY,entity_type,deleted,entity_id PRIMARY 391 const,ospredo.field_data_field_match_team1.entity_id,const 1 100 Using where 1 PRIMARY users_field_data_field_reg_user eq_ref PRIMARY PRIMARY 4 ospredo.field_reg_team_nodefield_data_field_reg_user.field_reg_user_uid 1 100 1 PRIMARY node eq_ref PRIMARY,node_status_type,node_type PRIMARY 4 ospredo.field_data_field_match_team1.entity_id 1 23.6 Using where 1 PRIMARY field_data_field_match_team2 ref PRIMARY,entity_type,deleted,entity_id PRIMARY 391 const,ospredo.field_data_field_match_team1.entity_id,const 1 100 1 PRIMARY node_field_data_field_match_team1 eq_ref PRIMARY PRIMARY 4 ospredo.node_field_data_field_match_team1field_data_field_reg_team.field_reg_team_nid 1 100 Using where 1 PRIMARY node_field_data_field_match_team2 eq_ref PRIMARY PRIMARY 4 ospredo.field_data_field_match_team2.field_match_team2_nid 1 100 Using where 1 PRIMARY field_reg_team_node eq_ref PRIMARY PRIMARY 4 ospredo.field_reg_team_nodefield_data_taxonomy_vocabulary_8.entity_id 1 100 Using where; Using index 1 PRIMARY node_field_data_field_match_team2field_data_field_reg_team ref field_reg_team_nid field_reg_team_nid 5 ospredo.node_field_data_field_match_team2.nid 6 100 Using index 1 PRIMARY field_reg_team_node_1 eq_ref PRIMARY PRIMARY 4 ospredo.node_field_data_field_match_team2field_data_field_reg_team.entity_id 1 100 Using where; Using index 1 PRIMARY field_reg_team_node_1field_data_field_reg_user ref PRIMARY,entity_type,deleted,entity_id PRIMARY 391 const,ospredo.field_reg_team_node_1.nid,const 1 100 1 PRIMARY users_field_data_field_reg_user_1 eq_ref PRIMARY PRIMARY 4 ospredo.field_reg_team_node_1field_data_field_reg_user.field_reg_user_uid 1 100 Using index 1 PRIMARY field_data_field_match_court ref PRIMARY,entity_type,deleted,entity_id PRIMARY 391 const,ospredo.field_data_field_match_team1.entity_id,const 1 100 1 PRIMARY node_field_data_field_match_court eq_ref PRIMARY PRIMARY 4 ospredo.field_data_field_match_court.field_match_court_nid 1 100 Using where; Using index 1 PRIMARY node_field_data_field_match_courtfield_data_field_court_venue ref PRIMARY,entity_type,deleted,entity_id PRIMARY 391 const,ospredo.node_field_data_field_match_court.nid,const 1 100 1 PRIMARY node_field_data_field_court_venue eq_ref PRIMARY PRIMARY 4 ospredo.node_field_data_field_match_courtfield_data_field_court_venue.field_court_venue_nid 1 100 Using where; Using index 8 DEPENDENT SUBQUERY na ref PRIMARY PRIMARY 4 ospredo.node_field_data_field_court_venue.nid 1 4.67 Using where 7 DEPENDENT SUBQUERY na ref PRIMARY PRIMARY 4 ospredo.node_field_data_field_match_court.nid 1 4.67 Using where 6 DEPENDENT SUBQUERY na ref PRIMARY PRIMARY 4 ospredo.field_reg_team_node_1.nid 1 4.67 Using where 5 DEPENDENT SUBQUERY na ref PRIMARY PRIMARY 4 ospredo.field_reg_team_node.nid 1 4.67 Using where 4 DEPENDENT SUBQUERY na ref PRIMARY PRIMARY 4 ospredo.node_field_data_field_match_team2.nid 1 4.67 Using where 3 DEPENDENT SUBQUERY na ref PRIMARY PRIMARY 4 ospredo.node_field_data_field_match_team1.nid 1 4.67 Using where 2 DEPENDENT SUBQUERY na ref PRIMARY PRIMARY 4 ospredo.node.nid 1 4.67 Using where

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.