Accelerate selection by varchar - Mariadb 10

Asked

Viewed 30 times

1

I have an Innodb table with 105 columns and about 300,000 rows. There is a varchar(24) where the username is stored.

When I execute queries like these:

SELECT * FROM users WHERE BINARY username='algumUsuario';
SELECT * FROM users WHERE username='algumUsuario';

The time is 1 second or more, to select only one user in the table.

What can be done to speed up this selection? Searching, I saw some things about Dexes, but it didn’t work for this case, only for numeric columns (int).

I did tests increasing the innodb_buffer_pool_size, but it didn’t help either.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.