They have all different sizes but how about performance issue between each other ? How can we compare them in sql ?
They have all different sizes but how about performance issue between each other ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on the db vendor’s implementation of I/O.
Edited (“32 bits” changed to “8 bits”)
Many DBs never use anything less than an 8-bit byte to write to disk. For example, the postgres doco states that its
booleandatatype actually takes 1 byte when stored on disk (not 1 bit). All postgres types use a whole number of bytes.Space on disk is even more important when the field is indexed. Less space means more index entries per I/O page. The less I/O the faster the query – recalling that I/O is roughly 1000 times slower than in-memory work.