Query not using indexes?

2006-12-13 Thread Chris Boget
Here is a query I'm trying to run. It doesn't look like it is overly complex and, granted, it's joining on a few tables, I wouldn't imagine it would take 6.5s to execute. SELECT TRIM( users.username ) AS username, TRIM( games.game_name ) AS game_name, CASE WHEN 0 != UNIX_TIMESTAMP( MAX(

Re: Query not using indexes?

2006-12-13 Thread Jay Pipes
Make sure that all joined fields are of identical types, otherwise the query executor must cast each and every join value, which may be affecting the query time... Jay Chris Boget wrote: Here is a query I'm trying to run. It doesn't look like it is overly complex and, granted, it's joining on

Re: Query not using indexes?

2006-12-13 Thread Chris Boget
Make sure that all joined fields are of identical types, otherwise the query executor must cast each and every join value, which may be affecting the query time... Can you even define fields having foreign keys to be of a different type? Anyway, taking a look at my JOIN INNER JOIN users ON