java - Why should the length property at hibernate mapping file be a power of 2? -


I have read somewhere that the length of the hibernate mapping file should have the power of 2, that is, 2, 4, 8, 16, 32, ... and so on. Is it true? And if so, what is that?

The length of a property in the hibernate will be mapped to the length of the database area Do you really have the power of two Should use?

  1. Go to your app's needs first if you have an employee number of 15 characters, then the field does not make power 16 by 2.

  2. If you have to choose the length of length, then it is important to save the disk nowadays, some bits of the deprecated hard disk on this type of database and area?

  3. I can not magnify all the performance details with so many databases, versions, engines or configurations. Maybe Dashmi (255) Dummy is faster in SQL 4.3.1 and Varvar (256) has been implemented as Clube. But the floral is compared to version 4.4. This is why big organizations have a database administrator.

    In addition to this I am not aware of any specific limit or reason in Hibernation, so it is appropriate to use the powers of 2. Just do not forget to add length

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -