Okay so me and a friend of mine are discussing the following:

If you have 1.

a table with 10 fields, each a varchar(255)

or 2.

a table with 10 fields, each a varchar(1billion)


Which would be better, performance wise?

I say it won't matter, because MySQL reads the field names before it scans the content. My friend says it will matter, because the field size always impacts the performance of the scanning process.

Recommended Answers

All 6 Replies

varchar(1billion) is not supported.

I was just giving an example ;). Let's say "the largest number available for varchar" then.

it won't matter.

So no performance difference? :o

Should not be, but it may depend on how you use the column and what is stored in the column.

That's the question :). Would it make difference if the varchars were used to their max? So if they were completely filled?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.