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

dal_context: Fix cost ms not calculated correctly #4306

Merged
merged 2 commits into from
Mar 3, 2022

Conversation

Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Mar 3, 2022

Signed-off-by: Xuanwo github@xuanwo.io

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Fix cost ms not calculated correctly

Close #4256

Changelog

  • Bug Fix

Test Plan

Unit Tests

Stateless Tests

Signed-off-by: Xuanwo <github@xuanwo.io>
@vercel
Copy link

vercel bot commented Mar 3, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/databend/databend/7bXzJtieNyycAGJ5CnoowkygnRmh
✅ Preview: Canceled

[Deployment for c5d5aac canceled]

@mergify
Copy link
Contributor

mergify bot commented Mar 3, 2022

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@mergify mergify bot added the pr-bugfix this PR patches a bug in codebase label Mar 3, 2022
@BohuTANG
Copy link
Member

BohuTANG commented Mar 3, 2022

/lgtm

@Xuanwo Xuanwo requested a review from dantengsky March 3, 2022 02:29
@Xuanwo
Copy link
Member Author

Xuanwo commented Mar 3, 2022

Local test result: (the sql whole time: 6.95s)

           log_type: 2
       handler_type: MySQL
          tenant_id: admin
         cluster_id:
           sql_user: root
     sql_user_quota: UserQuota { max_cpu: 0, max_memory_in_bytes: 0, max_storage_in_bytes: 0 }
sql_user_privileges: UserGrantSet { entries: [GrantEntry { user: "root", host_pattern: "127.0.0.1", object: Global, privileges: BitFlags<UserPrivilegeType>(0b1111111101111, Usage | Select | Insert | Update | Delete | Create | Drop | Alter | Super | CreateUser | CreateRole | Grant) }], roles: {} }
           query_id: 4f908ce2-a087-4253-8114-76b333e40d04
         query_kind: SelectPlan
         query_text: select count(*) from test
         event_date: 2022-03-03
         event_time: 1646273687265
   current_database: default
          databases:
             tables:
            columns:
        projections:
       written_rows: 0
      written_bytes: 0
          scan_rows: 1000000000
         scan_bytes: 8000000000
  scan_byte_cost_ms: 1867
    scan_partitions: 1024
   total_partitions: 1024
        result_rows: 1
       result_bytes: 8
          cpu_usage: 32
       memory_usage: 2672
        client_info:
     client_address: Some(127.0.0.1:46716)
     exception_code: 0
     exception_text:
        stack_trace:
     server_version:
              extra:

@mergify mergify bot merged commit f65d570 into datafuselabs:main Mar 3, 2022
@Xuanwo Xuanwo deleted the fix-cost-ms branch March 3, 2022 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need-review pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

query_log/bug: scan_byte_cost_ms is 0
4 participants