Saving memory space

rohnds

Registered User.
Local time
Yesterday, 19:20
Joined
Jul 20, 2010
Messages
19
I have a field named as "StockNumber" and is defined as Integer (Long). The values of this field range from
000001 to 999999. My question is this, what defined is more optimal in storage amount? Would it be better to leave it defined as Integer (long) or should as redefined as Text with length of 6. Which definition would have more space?

Rohn
 
does it really matter? this will only be an issue for your application is incredibly large. that's very rare. I work with an app right now that takes 8+ hours to run in vb and uses Access db's, but the number of recs that are manipulated in that timeframe are somewhere in the vicinity of 3 million.

so unless you're that big, I seriously wouldn't worry about it.
 
It is my understanding that size of the db is MS Access is ~ 2gig.

I doubt if I would have 3 millions records in my application but I would like to know the what size either of those two would use.


Thanks,
Rohn
 
an integer is moe efficent

but in practice, a part number is generally a string, so that leading zero's need to be shown.

because an integer key is more efficient, I would actually use an autonumber key, for use as your primary key. I would then add the "real" stock number string, as a separate indexed field. if you then ever need to change your product numbers, you can do so without causing any "cascading update" issues.
 

Users who are viewing this thread

Back
Top Bottom