[Fixed]FilesElement query too slow. Is generating timeouts

More
11 years 2 months ago #39689 by ceap80
Hello.

I have a site with 12000+ articles and 9092 rows in table jos_flexicontent_files

When using minigallery field, I have the following problem.


As I click the button to bring up the file manager popup, the query or queries that run at that moment are too slow.

The following query takes 90 seconds to complete and I was wandering how could I improve that?
Code:
SELECT i.id as id, i.title, CONCAT('%', '"originalname";s:%:%"', f.filename, '"%') FROM jos_content AS i JOIN jos_flexicontent_fields_item_relations AS rel ON rel.item_id = i.id JOIN jos_flexicontent_fields AS fi ON fi.id = rel.field_id AND fi.field_type IN ('image') JOIN jos_flexicontent_files AS f ON rel.value LIKE CONCAT('%', '"originalname";s:%:%"', f.filename, '"%') GROUP BY i.id ORDER BY i.title ASC

I've tried adding a index in column value of table jos_flexicontent_fields_item_relations but that did not help at all.


I have flexicontent version 2.1.0 r1720

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #39700 by ggppdk
Hello

this code exists in both
filemanager (=Backend TAB "Files")
and
fileselement (=selecting files in item form)


but it is not set to run in fileselement mode
(it is not really needed to run there)

i will look into this


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #39703 by ceap80
Thanks.

If you need me to do anything that could help don't hesitate to ask.

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #39704 by ggppdk
Hello,

this code is used to display the item filter, but include only items that have a file,

i will replace this with input text box , in which user can write an item id


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #39706 by ggppdk
Hello,

try this file:
[attachment=0:wypy8af8]<!-- ia0 -->view.html.zip<!-- ia0 -->[/attachment:wypy8af8]

(extract this archive) and replace file (first backup old file):
administrator/components/com_flexicontent/views/fileselement/view.html.php


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Attachments:

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #39707 by ceap80
Hi.

In terms of speed is working flawless.

It seems that the filter by item is not working but I'm not 100% sure of it, I'll continue the tests tomorrow and report back.

Thanks a lot!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.880 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline