Question

I have one stored procedure in while I am getting comma separated values in parameters. I have three parameters which has comma separated values. and i need to put them in table's columns so I am using while loop. but i am scared when too many(say lakhs of users) users will connect to my website then my procedure will have performance issues.
Does anyone have better solution on this issue?

Thanks in advance.
Regards,
MySQL DBA

Was it helpful?

Solution

SQL is interpreted, even though it is said to be 'compiled'. This means that your code might run faster if you simply break up the strings outside the DB and execute multiple inserts instead of 1 call to a SQL proc which using interpreted SQL loops through the input.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top