Dear Sirs,
Given the following table
CREATE TABLE specifications (
objectId int not null default 0,
paramValue varchar(255) not null default '',
INDEX(objectId)
)
and the query
SELECT * FROM specifications WHERE objectId = x
Would the speed of the query be slower if the paramValue
field were changed to a TEXT field (instead of VARCHAR) ?
I believe that the speed of the query is only dependent
on the datatypes of the queried field (in the WHERE) clause,
is this not so ?
In case you're wondering, I have an object which stores
its attributes in 2 tables: the 'specifications' table
above stores about 50 values which are all less than 255
characters each. Another table stores a longer 'description'
in a TEXT field.
So I have been wondering whether it might be quicker to
store all of the object's properties in one table (changing
the VARCHAR field to a TEXT) and therefore just make
one query.
Thank you very much in advance,
Heather