On 11/12/19 12:38 PM, cte...@gmail.com [firebird-support] wrote:
>  
>
> What are the trade-offs of CHAR vs. VARCHAR?  I know that VARCHAR
> consumes less space.  Anything thing else (are VARCHAR searches slower)?
>
In some implementations of SQL (I don't know if firebird is one of
them), a row without any variable length items (like VARCHAR) and thus
of fixed length could be stored in a somewhat optimized way making its
access somewhat faster because all the records were the same size.

VARCHAR also doesn't always take less space, as very short CHAR fields
can be smaller than the overhead of a VARCHAR, and if the CHAR field is
storing a value that is always the same length (like maybe a hash code)
the overhead of VARCHAR is just wasted.

-- 
Richard Damon

  • [firebird-suppor... cte...@gmail.com [firebird-support]
    • Re: [firebi... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
      • Re: [fi... Clyde Eisenbeis cte...@gmail.com [firebird-support]
        • Re:... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
        • Re:... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
    • Re: [firebi... Richard Damon rich...@damon-family.org [firebird-support]
      • Re: [fi... Ann Harrison aharri...@ibphoenix.com [firebird-support]
        • Re:... Clyde Eisenbeis cte...@gmail.com [firebird-support]
          • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
        • Re:... blackfalconsoftw...@outlook.com [firebird-support]
          • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
            • ... blackfalconsoftw...@outlook.com [firebird-support]
              • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
                • ... blackfalconsoftw...@outlook.com [firebird-support]
                • ... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
                • ... blackfalconsoftw...@outlook.com [firebird-support]

Reply via email to