I've never really understood how to use Indexes, but I know it's good for performance. And know I've got a performance issue, which I think can be solved by uding index or sometihng alike. Here's my problem.
I have a field which cointains an array of values. To extract the value I want to show, I do like this:
When selecting many records this operation is very slow, probably because the charsplit function isn't a MySql-built-in-function.
I don't want to redesign the table's field, since it's convient the way it is. But I'd like to store the expression above in a new field, MyNewField, (or index?), which is updated whenever the s.bgdRumSpecifi kation field is updated. By doing this I just have to do like this:
So, the question is. How do I do this? Create a field or index? How can tell MySql to update automatically?
Regards
Magnus Lüttkens
I have a field which cointains an array of values. To extract the value I want to show, I do like this:
Code:
SELECT CAST(charsplit(s.bgdRumSpecifikation,';',65) As SIGNED) ...
I don't want to redesign the table's field, since it's convient the way it is. But I'd like to store the expression above in a new field, MyNewField, (or index?), which is updated whenever the s.bgdRumSpecifi kation field is updated. By doing this I just have to do like this:
Code:
SELECT MyNewField ...
Regards
Magnus Lüttkens