PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > PhotoPost Support > PhotoPost Pro Support Forums > Photopost Pro Bug Reports

Photopost Pro Bug Reports Post post installation PhotoPost Pro problems here.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old September 19th, 2006, 12:41 PM   #1 (permalink)
Member
Verified Customer
 
Join Date: Oct 2002
Location: Germany
Posts: 254
Send a message via ICQ to dontom
Slow queries - what causes them

Hi,
I want to track down what causes this type of slow query (our s-q-log is full of these).

Which file exectute this kind of queries?
Thanks
Thomas

# Time: 060919 17:52:47
# User@Host: xxxxxxxxxxx @ xxxxxxx [10.0.0.2]
# Query_time: 12 Lock_time: 0 Rows_sent: 206685 Rows_examined: 413370
SELECT id,user,userid,cat,storecat,date,title,description,keywords,bigimage,width,height,filesize,views,medwidth,medheight,medsize,approved,rating,allowprint,numcom,lastposter FROM photos WHERE approved < 2 ORDER BY disporder,date DESC;
dontom is offline   Reply With Quote
Old September 19th, 2006, 01:55 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,689
Possible spider on your site. There is nothing technically wrong with the query itself. it is only called in one place on the gallery. If you hit on the indexhead the ALL link and it shows all photos

Why out of couriosity do you have over 20000 unapproved photos?
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old September 19th, 2006, 02:14 PM   #3 (permalink)
Member
Verified Customer
 
Join Date: Oct 2002
Location: Germany
Posts: 254
Send a message via ICQ to dontom
Hi Chuck,
thanks for the prompt answer. Which file contains the query?
Edit: found it


Quote:
Why out of couriosity do you have over 20000 unapproved photos?
I have no idea - I guess it was a former pp bug

Thanks
Thomas
dontom is offline   Reply With Quote
Old September 19th, 2006, 02:31 PM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,689
Query_time: 12 Lock_time: 0 Rows_sent: 206685 Rows_examined: 413370

I mean 200000. what is in your unapproved que? Maybe I am just reading it wrong
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old September 19th, 2006, 02:59 PM   #5 (permalink)
Member
Verified Customer
 
Join Date: Oct 2002
Location: Germany
Posts: 254
Send a message via ICQ to dontom
It is just a strange output from mysql - we only have 200K photos in total.
rows examined = 2*rows sent - why - I don't know.

I added a limit 1000 to the query which should avoid the slow query
dontom is offline   Reply With Quote
Old September 19th, 2006, 03:23 PM   #6 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,689
yeah indeed strange output

Yeah well you might want to change your wording for that template to say last 1000 not all
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old September 25th, 2006, 01:34 PM   #7 (permalink)
Member
Verified Customer
 
Join Date: Oct 2002
Location: Germany
Posts: 254
Send a message via ICQ to dontom
another one, which causes slow queries and table locking:
SELECT * FROM comments WHERE comment != '' ORDER BY date DESC;

from which file this is issued?
(please add filename (php_self) in future pp-versions as comment in sql - makes troubleshooting much easier)
dontom is offline   Reply With Quote
Old September 25th, 2006, 02:59 PM   #8 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,689
It is in comshow.php
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old October 10th, 2006, 01:08 PM   #9 (permalink)
Member
Verified Customer
 
Join Date: Jan 2003
Location: NY
Posts: 214
Send a message via Yahoo to glowinggal
how did you fix this slow querying? We too are having performance issues on our site and losing valuable viewership and member visits due to it.
glowinggal is offline   Reply With Quote
Old October 10th, 2006, 01:11 PM   #10 (permalink)
Member
Verified Customer
 
Join Date: Oct 2002
Location: Germany
Posts: 254
Send a message via ICQ to dontom
A quick solution is to add limit clauses to the respective queries...
dontom is offline   Reply With Quote
Old November 9th, 2006, 09:55 PM   #11 (permalink)
Member
Verified Customer
 
Join Date: Jan 2003
Location: NY
Posts: 214
Send a message via Yahoo to glowinggal
how would one do that precisely?
glowinggal is offline   Reply With Quote
Old November 9th, 2006, 10:43 PM   #12 (permalink)
Member
Verified Customer
 
Join Date: Oct 2002
Location: Germany
Posts: 254
Send a message via ICQ to dontom
find the query, add ad the end e.g. "limit 1000"
You should know what you are doing, because it might have strange sideeffects (e.g. if pp is using the select to build pagination or something like that...)
dontom is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
slow queries - photopost RCA Photopost Pro Bug Reports 5 November 10th, 2006 09:37 AM
my PhotoPost si very slow mehbara Photopost Pro Installation & Upgrades 1 August 22nd, 2006 06:26 PM
queries BrandiDup Before You Buy 4 February 25th, 2006 03:16 PM


All times are GMT -5. The time now is 01:00 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0