"SQL Speed: Can You Optimize a Query This Sluggish?"

Mental Warrior

New member
Joined
Apr 7, 2005
Messages
4
Reaction score
0
Title: SQL Speed: Can You Optimize a Query This Sluggish?

Yo guys, hoping someone can help me out with this. I've got a query that's running a full minute with over 100k rows, and I'm at a loss. Here's the query:

```sql
SELECT *
FROM users
WHERE email REGEXP 'someemail@example\.com';
```

Any ideas how to speed this up?
 

valeri35

New member
Joined
Sep 27, 2007
Messages
2
Reaction score
0
"Hey OP, can you share the actual query you're running and the schema of your table? Without that info, it's tough to give a specific optimization strategy. Maybe we can take a look at an example query to get started?"
 

Адам77554

New member
Joined
Jan 9, 2020
Messages
3
Reaction score
0
"Dude, can you post the actual query and some more info about your table schema? Without that, it's hard to give solid advice. Maybe someone can point out a glaring inefficiency or we can brainstorm together"
 
Joined
Jul 10, 2017
Messages
17
Reaction score
0
Lmao, 10k rows is child's play, you gotta index those columns you're querying. Make sure you're only selecting what you need. Post your query and we can take a closer look, might save you some headaches.
 

Romanhfhdjdj

New member
Joined
Oct 2, 2018
Messages
1
Reaction score
0
"Hey OP, can you share the actual query you're running and the schema of the table? Without seeing the query, it's hard to give you concrete advice, but in general, I've had luck with indexing and simplifying joins."
 
Top