[MDEV-30830] ANALYZE FORMAT=JSON: r_unpack_time_ms is empty for the hashed joins Created: 2023-03-10  Updated: 2023-10-27  Resolved: 2023-04-04

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.6, 10.7, 10.8, 10.9, 10.10, 11.0
Fix Version/s: 11.1.0, 11.0.2, 10.6.13, 10.7.8, 10.8.8, 10.9.6, 10.10.4

Type: Bug Priority: Major
Reporter: Sergei Petrunia Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-30972 ANALYZE FORMAT=JSON: some time is una... Closed

 Description   

create table t10 (
  a int, 
  b int
);
insert into t10 select seq, seq/3 from seq_0_to_999;
 
create table t11 (
  a int,
  b int
);
insert into t11 select seq, seq/5 from seq_0_to_999;
set join_cache_level=6;
analyze format=json
select * from t10, t11 
where 
 t10.a < 700 and 
 t11.a < 100 
 and t10.b=t11.b;

will produce

      {
        "block-nl-join": {
          "table": {
            "table_name": "t11",
            "access_type": "hash_ALL",
            "key": "#hash#$hj",
            "key_length": "5",
            "used_key_parts": ["b"],
            "ref": ["test.t10.b"],
            "loops": 1000,
            "r_loops": 1,
            "rows": 1000,
            "r_rows": 1000,
            "cost": 9.5143874,
            "r_table_time_ms": 0.117991585,
            "r_other_time_ms": 0.403368737,
            "filtered": 100,
            "r_filtered": 10,
            "attached_condition": "t11.a < 100"
          },
          "buffer_type": "flat",
          "buffer_size": "36Kb",
          "join_type": "BNLH",
          "attached_condition": "t11.b = t10.b",
          "r_filtered": 100,
          "r_unpack_time_ms": 0
        }
      }

Note the

          "r_unpack_time_ms": 0



 Comments   
Comment by Sergei Petrunia [ 2023-03-30 ]

https://github.com/MariaDB/server/commit/2ca3d2d6bebbef1a0f5be158932c44fe711c9b50

Comment by Sergei Petrunia [ 2023-03-31 ]

https://github.com/MariaDB/server/commit/92ef20faf750ee3564a4e555bb0acbac18c83f7f - 10.6 version

Comment by Sergei Petrunia [ 2023-04-04 ]

Got Ok to push from Monty.

Generated at Thu Feb 08 10:19:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.