Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
A simple google search of VARCHAR size, showed that it is not an arbitrarily sized string, which means VARCHAR 150 and VARCHAR 2 would take up the same amount space. So, no-- I don't think there wo...
Answer
#3: Post edited
I haven't played around with SQL in years, but a simple google search of `VARCHAR size`, showed that it is not an arbitrarily sized string, which means `VARCHAR 150` and `VARCHAR 2` would take up the same amount space. So, no-- I don't think there would be any speed gains (unless the cache is in play which would most likely have a performance impact). My advice to you is to go with the smaller size (*if and only if* your profiling efforts show that it is faster, otherwise it would be premature optimization).
- A simple google search of `VARCHAR size`, showed that it is not an arbitrarily sized string, which means `VARCHAR 150` and `VARCHAR 2` would take up the same amount space. So, no-- I don't think there would be any speed gains (unless the cache is in play which would most likely have a performance impact). My advice to you is to go with the smaller size (*if and only if* your profiling efforts show that it is faster, otherwise it would be premature optimization).
#2: Post edited
I'm no SQL person, but a simple google search of `VARCHAR size`, showed that it is not an arbitrarily sized string, which means `VARCHAR 150` and `VARCHAR 2` would take up the same amount space. So, no-- I don't thing there would be any speed gains (unless the cache is in play which would most likely have a performance impact). My advice to you is to go with the smaller size (*if and only if* your profiling efforts show that it is faster, otherwise it would be premature optimization).
- I haven't played around with SQL in years, but a simple google search of `VARCHAR size`, showed that it is not an arbitrarily sized string, which means `VARCHAR 150` and `VARCHAR 2` would take up the same amount space. So, no-- I don't think there would be any speed gains (unless the cache is in play which would most likely have a performance impact). My advice to you is to go with the smaller size (*if and only if* your profiling efforts show that it is faster, otherwise it would be premature optimization).
#1: Initial revision
I'm no SQL person, but a simple google search of `VARCHAR size`, showed that it is not an arbitrarily sized string, which means `VARCHAR 150` and `VARCHAR 2` would take up the same amount space. So, no-- I don't thing there would be any speed gains (unless the cache is in play which would most likely have a performance impact). My advice to you is to go with the smaller size (*if and only if* your profiling efforts show that it is faster, otherwise it would be premature optimization).