Let's assume that in some particular case I know that I will need CharField
for single words. I wonder does the length of CharField
influences the performance of the query, or the size of DB when it's defined as bigger.
In this case, I assume that all data fit the size of CharField
because - let's assume - that in every row in the column each cell has a word with length 3. For example:
What changes when I define the length of CharField to 3, or 250?
I'm aware that there are (many) other reasons to define CharFiled
in some way (define a particular allowed range), but are there any reasons to try to make the available range smaller for the sake of performance or the size of DB
? Is it worth considering and if so, when?
Would it be the same for SQLite and PostgreSQL?