Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TPCC prepares progress to obtain different plan digests for the same SQL. #47634

Closed
King-Dylan opened this issue Oct 14, 2023 · 4 comments · Fixed by #47952
Closed

TPCC prepares progress to obtain different plan digests for the same SQL. #47634

King-Dylan opened this issue Oct 14, 2023 · 4 comments · Fixed by #47952
Assignees
Labels
affects-6.1 affects-6.5 affects-7.1 affects-7.5 report/community The community has encountered this bug. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@King-Dylan
Copy link
Contributor

Bug Report

Run tiup tpcc preapre will get different plandigests for the same SQL.

1. Minimal reproduce step (Required)

tiup prepare and check the slow query log.

SELECT
  count(*)
FROM
  (
    SELECT
      c.c_id,
      c.c_d_id,
      c.c_w_id,
      c.c_balance c1,
      (
        SELECT
          sum(ol_amount)
        FROM
          orders,
          order_line
        WHERE
          OL_W_ID = O_W_ID
          AND OL_D_ID = O_D_ID
          AND OL_O_ID = O_ID
          AND OL_DELIVERY_D IS NOT NULL
          AND O_W_ID = ?
          AND O_D_ID = c.C_D_ID
          AND O_C_ID = c.C_ID
      ) sm,
      (
        SELECT
          sum(h_amount)
        FROM
          history
        WHERE
          H_C_W_ID = ?
          AND H_C_D_ID = c.C_D_ID
          AND H_C_ID = c.C_ID
      ) smh
    FROM
      customer c
    WHERE
      c.c_w_id = ?
  ) t
WHERE
  c1 <> sm - smh

2. What did you expect to see? (Required)

With the same plandigest

3. What did you see instead (Required)

Got the different plandigest

4. What is your TiDB version? (Required)

v7.4.0

@King-Dylan King-Dylan added the type/bug The issue is confirmed as a bug. label Oct 14, 2023
@King-Dylan
Copy link
Contributor Author

/assign @King-Dylan

@King-Dylan
Copy link
Contributor Author

King-Dylan commented Oct 14, 2023

Indexjoin probe side using predicate condition,and normailze progress didn't replaced it with ?

664adb55-3651-469b-ad7a-e45983d9c40a

@King-Dylan King-Dylan changed the title tpcc prepare different plandigests for the same SQL TPCC prepares progress to obtain different plan digests for the same SQL. Oct 14, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Oct 17, 2023
@qw4990 qw4990 assigned qw4990, AilinKid and King-Dylan and unassigned King-Dylan Oct 30, 2023
@AilinKid AilinKid added affects-6.1 affects-6.5 affects-7.1 and removed may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Oct 30, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 30, 2023
@easonn7
Copy link

easonn7 commented Nov 1, 2023

/approve

ti-chi-bot bot pushed a commit that referenced this issue Dec 8, 2023
ti-chi-bot bot pushed a commit that referenced this issue Dec 22, 2023
ti-chi-bot bot pushed a commit that referenced this issue Feb 18, 2024
@seiya-annie
Copy link

/found community

@ti-chi-bot ti-chi-bot bot added the report/community The community has encountered this bug. label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.1 affects-6.5 affects-7.1 affects-7.5 report/community The community has encountered this bug. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
7 participants