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

Why is querying millions of inserted data slower than MySQL? #2151

Closed
tx991020 opened this issue Aug 11, 2023 · 9 comments
Closed

Why is querying millions of inserted data slower than MySQL? #2151

tx991020 opened this issue Aug 11, 2023 · 9 comments
Labels
C-enhancement Category Enhancements

Comments

@tx991020
Copy link

What type of enhancement is this?

Performance

What does the enhancement do?

Why is querying millions of inserted data slower than MySQL?

Implementation challenges

No response

@tx991020 tx991020 added the C-enhancement Category Enhancements label Aug 11, 2023
@MichaelScofield
Copy link
Collaborator

@tx991020 can you provide more detailed infomation about your benchmark testing setup?

@tx991020
Copy link
Author

translates to The format is as follows
"1","1208026841","477458502","FKlJh","2023-08-05 08:56:00","pSvqg","gQWxL","JikNj","972076018","348948709","1","GMZHG","XzNXZ","QHfSD","0","ejliy"

6 million records
Comparison between standalone MySQL and standalone GrepTime: In terms of a count query with a non-indexed field, GrepTime is several seconds slower than MySQL in execution.

@tx991020
Copy link
Author

MySQL takes 6 seconds, while GrepTime seems to take 11 seconds

@MichaelScofield
Copy link
Collaborator

Thx! Can you share the create table sql as well? If there are senstive data, it's ok to change the columns names. We'd like to do the same benchmark to investigate more

@tx991020
Copy link
Author

CREATE TABLE IF NOT EXISTS xxxx (
a BIGINT NULL,
b BIGINT NULL,
c TIMESTAMP(3) NOT NULL DEFAULT current_timestamp(),
d TIMESTAMP(3) NULL DEFAULT current_timestamp(),
e STRING NULL DEFAULT '',
f INT NULL,
g INT NULL,
h INT NULL,
i STRING NULL,
j STRING NULL,
k STRING NULL,
l STRING NULL,
m STRING NULL,
n STRING NULL,
o INT NULL,
p INT NULL,
q INT NULL,
r STRING NULL,
s STRING NULL,
t STRING NULL,
u STRING NULL,
v STRING NULL,
w STRING NULL,
x TINYINT NULL DEFAULT 0,
y INT NULL,
z STRING NULL,
aa STRING NULL,
ab TINYINT NULL DEFAULT 0,
ac TINYINT NULL DEFAULT 0,
TIME INDEX (c),
PRIMARY KEY (a)
)
ENGINE=mito
WITH(
regions = 1
);

@MichaelScofield
Copy link
Collaborator

@tx991020 can you share the queries for benchmarking, too?

@tx991020
Copy link
Author

slect count(*) from xxx; slelect e from xxx where xx

@MichaelScofield
Copy link
Collaborator

thx, we'll investigate the query performance asap

@MichaelScofield
Copy link
Collaborator

@tx991020 we are currently have some issues related to scan, dragging down our overall query performance. It's planned to be optimized soon, stay tuned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements
Projects
None yet
Development

No branches or pull requests

2 participants