Numbers work differently. An index on a number column should be faster than the same sized char or varchar column. First a foremost, make sure your column will accommodate your needs, both current and future. Then try to get performance from your structure. Remember, if you are only storing positive numbers, make it unsigned, you essentially double your capacity to store positive numbers without changing the column type.
On Jan 13, 2005, at 4:37 AM, Philippe Poelvoorde wrote:
Hi,
- 100000 products in both cases. One time the column is a MediumInt, the
other time a BigInt. I know there is a difference in disk space usage, but
is there also one in performance at all ?
I'm not sure, this apply to your case. I had set a unique index on a char(50) and it was 2x slower than a varchar(50). My guest is that it use more disk seeks to retrieve all data needed in the index. So I would say that's the same about mediumint/bigint.
(in all case be sure to do "optimize table your_table")
-- Philippe Poelvoorde COS Trading Ltd.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
-- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]