primary keys having text data type

P

Paul Ponzelli

I've got some primary keys whose values look like numbers, such as 100434,
100435 etc., but they have a text data type instead of a number data type.
If I had built these tables myself, I would have defined them as Long
Integer data types, but I inherited the database from another developer.

I ran the Performance Analyzer, and it suggested converting the data types
of these primary keys to Long Integer. However, there are existing queries
that use these fields, and a number of references to these fields in form
and report modules that punctuates these fields as text data. So if I
change them to Long Integer like the Analyzer suggests, I'll have to spend
some time modifying the queries and the VBA code that refers to the fields.

My question is this: is it worth going through the effort to make the
changes? How important is it to change the data type of these primary key
fields to Long Integer?

Thanks in advance,

Paul
 
J

John Vinson

My question is this: is it worth going through the effort to make the
changes? How important is it to change the data type of these primary key
fields to Long Integer?

I think any benefit would be minute. A Long is 4 bytes; it appears
that your text field is 8. This makes your indexes bigger, but Access
is pretty good about such things; I've used 24-byte alpha fields as
keys with no difficulty.

John W. Vinson[MVP]
 
P

Paul Ponzelli

In that case I'll just keep them, rather than spend the time to make all the
adjustments.

Thanks, John.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top