In question of performance is it more feasible to use null or empty?

0

What I want to know specifically is what should I use when making an insertion in a table of a database, we are talking about tables that can accommodate more than 5000 records. I have a field that in most cases is stored as an empty string. In my ignorance I would say that an empty string weighs more than a null . But I'm not sure, that's why I want the right answers to know if I should go from null to empty before making the insert.

    
asked by Necroyeti 26.01.2018 в 21:12
source

1 answer

0

The problem is really the design of the table, because you need to have a field that is almost always empty in the same table with all the other values ??

It may just be better to create a related table and just insert a value in it when you have it, that would save you some memory and have to deal with all those gaps.

I invite you to review this article about database normalization, especially the Codd Rules (Rule 3) that talks about nulls.

link

    
answered by 31.03.2018 в 01:06