|
Home > Archive > MySQL ODBC Connector > September 2005 > varchar vs char speed improvement
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
varchar vs char speed improvement
|
|
| Ow Mun Heng 2005-09-27, 3:23 am |
| Is there any doc looking at benchmarks of a database which is populated
entirely with fixed length char compared to variable character lengths?
I know using char is preferred over varchar when it comes to speed. Is
there any available benchmarks available?
Pointers where would be appreciated.
--
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
98% Microsoft(tm) Free!!
Neuromancer 10:38:25 up 2 days, 15:24, 6 users, load average: 0.71,
0.56, 0.35
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw
| |
|
| 2005/9/27, Ow Mun Heng <Ow.Mun.Heng@wdc.com>:
> Is there any doc looking at benchmarks of a database which is populated
> entirely with fixed length char compared to variable character lengths?
>
> I know using char is preferred over varchar when it comes to speed. Is
> there any available benchmarks available?
I guess benchmarks depends on your data...
varchar take really less space, and so is faster to read from disk, so
you could improve speed in having varchar ! But since it cause dynamic
row format, it can makes think slower.
>
> Pointers where would be appreciated.
>
> --
> Ow Mun Heng
> Gentoo/Linux on DELL D600 1.4Ghz 1.5GB RAM
> 98% Microsoft(tm) Free!!
> Neuromancer 10:38:25 up 2 days, 15:24, 6 users, load average: 0.71,
> 0.56, 0.35
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql? unsub...mail
.com
>
>
--
Pooly
Webzine Rock : http://www.w-fenec.org/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw
| |
| Martijn van den Burg 2005-09-28, 1:23 pm |
| On Tuesday 27 September 2005 11:59, Pooly wrote:
> 2005/9/27, Ow Mun Heng <Ow.Mun.Heng@wdc.com>:
>
> I guess benchmarks depends on your data...
> varchar take really less space, and so is faster to read from disk, so
> you could improve speed in having varchar ! But since it cause dynamic
> row format, it can makes think slower.
>
The MySQL Certification Study Guide states: "For InnoDB tables, it is also
true that CHAR columns take more space on average than VARCHAR. But there is
no retrieval speed advantage for InnoDB as there is with MyISAM, because the
InnoDB engine implements storage for both CHAR and VARCHAR in a similar way.
In fact, retrieval of CHAR values might be slower because on average they
require more information to be read from disk." (p. 414).
So your mileage depends on storage engine, too.
--
</Martijn>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw
|
|
|
|
|