This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

andrius63313
andrius63313

I have about 80k models with attached images (300k images total). When I am filtering and retrieving these models it tooks more than 15s. I looked with Clockwork plugin and found out that every image query lasts about 1.5s. I copied that sql code and tried directly on my database and it showed me results after 0.0008s. So, does anybody know why model with images queries are slow and how could I fix it? Sql example:

SELECT * FROM `system_files` WHERE `system_files`.`attachment_type` = 
'Andrius\\Wms\\Models\\Part' and `system_files`.`attachment_id` = '11111' and `field` = 
'images' and `system_files`.`attachment_id` IS not NULL ORDER BY `sort_order` ASC

Last updated

JeffGoldblum
JeffGoldblum

What's the actual code that you're running that's slow?

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.