database

GK User
Thu Jul 05, 2012 10:14 am
I get a message from my hosting company, that query you see below causes overload database server:

SELECT c.*, i.catid, i.title, i.alias, category.alias as catalias, category.name as categoryname
FROM jom_k2_comments as c
LEFT JOIN jom_k2_items as i ON i.id=c.itemID
LEFT JOIN jom_k2_categories as category ON category.id=i.catid
WHERE i.published=1
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2012-07-04 15:48:51' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2012-07-04 15:48:51' )
AND i.trash=0 AND i.access IN(1,1) AND category.published=1 AND category.trash=0 AND category.access IN(1,1) AND c.published=1 ORDER BY c.commentDate DESC LIMIT 0, 3

They ask me to delete or optimalize this bad script.
How should I do it? Who can help me fix that stuff?
I have server on nazwa.pl and The World News II template.
User avatar
Fresh Boarder

GK User
Thu Jul 05, 2012 12:50 pm
Hi,

Can you please ask them if they know which file that script comes from?
User avatar
Platinum Boarder

GK User
Fri Jul 06, 2012 2:05 pm
I've been informed that such information has author of that template. That's why I'm writing to you.
User avatar
Fresh Boarder

GK User
Fri Jul 06, 2012 2:24 pm
Hi,

I'm checking this with a developer and will update you soon.
User avatar
Platinum Boarder

GK User
Fri Sep 21, 2012 9:14 pm
Hi, I have the same problem with the server. my site crash cased by database. how can I solve this problem?
User avatar
Expert Boarder

teitbite
Sun Sep 23, 2012 9:58 am
Hi

First of all try update template and News Show Pro to the latest version. I still cannot tell which extension is using this, so update K2 component too. Let me know if it helped.
User avatar
Moderator


cron