Reputation: 24035
Does anybody know what the performance of using substring in MySQL is like? I have some insert and update calls where I have to truncate all the fields (up to around 15) using substring statements. These will get call pretty regularly so I'm a little worried about performance.
Upvotes: 2
Views: 2678
Reputation: 300807
Intensive string handling in SQL generally performs relatively poorly (it's not what SQL was designed for).
But you should first profile to make sure you actually have a bottleneck.
[If you were using MS SQL Server, then any complex string handling (like regular expression matching) should probably use a CLR stored procedure.]
Upvotes: 2