same size VARCHAR or INT IX faster?

Started by Matthew Peterover 20 years ago3 messagesgeneral
Jump to latest
#1Matthew Peter
survivedsushi@yahoo.com

same size VARCHAR or INT IX faster? i assume INT. The
reason I ask is I was wondering what (if any) is the
avg delay from one over the other? And benefit of one
over the other? Thanks.

__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

#2Richard Huxton
dev@archonet.com
In reply to: Matthew Peter (#1)
Re: same size VARCHAR or INT IX faster?

Matthew Peter wrote:

same size VARCHAR or INT IX faster? i assume INT. The
reason I ask is I was wondering what (if any) is the
avg delay from one over the other? And benefit of one
over the other? Thanks.

If you want numbers, use INT. If you want text use a VARCHAR.

It's probably difficult to come up with speed comparisons for "the same
size" since varchar will have an overhead for the field-length as well
as the number of characters.

Even then, you'd have to account for client language and application
overheads.

In any case, optimising at this level is unlikely to be a good use of
your time unless you really have reached the practical limits of
available hardware.

--
Richard Huxton
Archonet Ltd

#3Matthew Peter
survivedsushi@yahoo.com
In reply to: Richard Huxton (#2)
Re: same size VARCHAR or INT IX faster?

I assumed as much. Now's the time for me to optimize
so I'd rather know and make optimizations accordingly,
than step blindly. Thanks for the reply. As always,
your a big help.

--- Richard Huxton <dev@archonet.com> wrote:

Matthew Peter wrote:

same size VARCHAR or INT IX faster? i assume INT.

The

reason I ask is I was wondering what (if any) is

the

avg delay from one over the other? And benefit of

one

over the other? Thanks.

If you want numbers, use INT. If you want text use a
VARCHAR.

It's probably difficult to come up with speed
comparisons for "the same
size" since varchar will have an overhead for the
field-length as well
as the number of characters.

Even then, you'd have to account for client language
and application
overheads.

In any case, optimising at this level is unlikely to
be a good use of
your time unless you really have reached the
practical limits of
available hardware.

--
Richard Huxton
Archonet Ltd

---------------------------(end of
broadcast)---------------------------
TIP 5: don't forget to increase your free space map
settings

____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs