Closed kafkiansky closed 1 year ago
I think we have to turn off interpolation of values not only for this reason.
Recently I've found out that interpolator affects performance on big queries with many parameters.
My project have higher memory limit, so instead of getting allowed memory size of bytes exhausted
I had long response times. I noticed that actual query execution takes like ~2s and its interpolation ~6s, which is quite a lot for simple parameters substitution.
I also stuck with own fork of cycle 1.x, so I fixed this issue for myself using preg_replace
https://github.com/hustlahusky/cycle-database/commit/acb08be5ac2f49952b99790266c72b2f912b74b8
Interpolator haven't changed much since 1.x, so I'm pretty sure simple preg_replace
would help
No duplicates 🥲.
Database
No matter.
What happened?
I insert 1000-5000 line batches and the default
php.ini
settings withmemory_limit: 256M
, then I periodically getallowed memory size of bytes exhausted
. Worst of all, this error happens after the insertion, which is why my application can not correctly count the number of inserted batches. The error occurs on this line: https://github.com/cycle/database/blob/bd48dec079d7666dd125e1299be031b123685684/src/Driver/Driver.php#L462 I hope this helps.Version