Re: Re: Alterations + all numeric tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Pavel,

Tuesday, March 2, 2004, 2:05:44 PM, you wrote:

PL> 398(rows) * 37(average) = 14KB, sorting is more faster
PL> etc...

I have been reading over the MySQL Manual today (specifically the
Optimisation sections) and one thing caught my eye:

"In some cases, MySQL can read rows from the index without even
consulting the datafile. If all columns used from the index are
numeric, only the index tree is used to resolve the query."

I have followed your advice and moved the variable length and char
fields out of my core table so all I am left with are the following:

threadid int(4) unsigned primary
boardid tinyint(3) unsigned
modified timestamp
created timestamp
status enum('l','p','h','d')

My question is - if I change the status field from an enum to a tiny
int (so L=1, P=2, etc) will MySQL consider the table to be purely
numeric? Or would the timestamps stop this from happening? If it does
then maybe I would see some more performance increases.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux