Home » Performance » MySQL » Lookup Tables not Using Indexes?
Lookup Tables not Using Indexes? [message #3084] Thu, 15 May 2008 22:09 Go to previous message
StephenJ  is currently offline StephenJ
Messages: 5
Registered: March 2008
Junior Member
I have some tables that are lookup tables. They contain a set of IDs, with text representations for them and they are joined against a table with the IDs. This seems like a pretty common thing.

Somethign like this:

STATUSES
STATUS_ID TEXT
1 Deleted
2 Viewed
3 Unread

MESSAGES
MESSAGE_ID STATUS_ID
1 1
2 1
3 2
4 3

When I enable "log queries not using indexes" the queries with the status_id table, are showing up in the slow query log as not being indexed.

Anyone know why?

My hunch is that the optimizer knows it needs every row and doesn't use the index... but that seems odd.

[Updated on: Thu, 15 May 2008 22:10]

Read Message
Read Message
Previous Topic:Skipping Errors in Binary Log with mysqlbinlog
Next Topic:Group by any date interval
Goto Forum:

  



Current Time: Wed Aug 27 20:44:27 EDT 2008

Total time taken to generate the page: 0.01124 seconds
.:: Contact :: Home :: MySQL Support by Percona.com ::.

Powered by: FUDforum 2.7.5.
Copyright ©2001-2006 FUD Forum Bulletin Board Software

MySQL Performance | Forum authority Badge