On Sun, Feb 25, 2001 at 12:37:32AM -0500, Mark Chalkley wrote:
At this point, there's only 1 row in companies, and 8 in contacts.
MySQL won't use an index on tables with so few rows. It is simply
faster to scan the whole table. As you tables grow, however, MySQL
will begin to use the indexes.
I got to wondering about that after your question about how many rows were there. I
was just playing with a test copy of the db, preparing to set the log options on the
production one, and noticed that. I rummaged around in the .pdf version of the manual
for over an hour before posting the
I have a question about index usage. I've got a query that's showing up in the -slow
log (it's taking less than long_query_time seconds, but I've got --log-long-format
set), indicating that it's not using an index, and I don't understand why.
Given two tables:
CREATE TABLE c1 (id INT(8) NOT
On Sat, Feb 24, 2001 at 11:33:40PM -0500, Mark Chalkley wrote:
I have a question about index usage. I've got a query that's
showing up in the -slow log (it's taking less than long_query_time
seconds, but I've got --log-long-format set), indicating that it's
not using an index, and I don't
At this point, there's only 1 row in companies, and 8 in contacts.
table typepossible_keys key key_len ref rowsExtra
companies system PRIMARY,comp_id 1 Using filesort
contactsALL cont_comp_id_idx