Re: Re: Alterations + all numeric tables

From: Date: Wed, 03 Mar 2004 13:48:23 +0000
Subject: Re: Re: Alterations + all numeric tables
References: 1 2 3 4 5 6  Groups: php.db 
Request: Send a blank email to php-db+get-33259@lists.php.net to get a copy of this message
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

« previous php.db (#33259) next »