Webmastersite.net
Register Log In

Get rid of unnedded querys

Title Get rid of unnedded querys
Description How to simplify the whole thing
Message Text Hi ! I have a large database with 150.000+ links and 8.000+ categories. I want to add even more data - there will be over 300.000 links, but i see that i am having problems with the page loading speed. As of now, the category pages need 4-6 seconds to load - this is too slow anyways and i can imagine what happens if i will have even more links. I see, however, that the most time is used to do unnecessary database queries and i would like to try exclude them. Take a look at all queries starting at 0.82 seconds - all produce 0 results ! I would like to eliminate them somehow if i would know where they are. Load time so far: 0.34 seconds. Performing query: SELECT id,name,parent,validated,description,time,parentnames,parentids,numlinks,hide,lastlinktime,custom,lastedit,moderators,headerinfo,related,numsub,type,permissions,subscribers,subscriber,mixtypes,isalbum,orderlinks,totalcomments,ulsearchmax,ulsearchquery,ulsearchadult,alias,catcols,linkcols,dmozpath,sponsorlinks,views,customwrap FROM wsnlinks_categories WHERE id=20 ; Load time so far: 0.34 seconds. Performing query: LOCK TABLES wsnlinks_email WRITE, wsnlinks_links WRITE, wsnlinks_categories WRITE, wsnlinks_members WRITE; Load time so far: 0.34 seconds. Performing query: SELECT id,`to`,subject,message,headers,replacement,mime FROM wsnlinks_email WHERE timesent=0 ORDER BY id ASC LIMIT 0,10; Number of rows is 0 for Resource id #41 Load time so far: 0.34 seconds. Performing query: UNLOCK TABLES; Load time so far: 0.34 seconds. Performing query: UPDATE wsnlinks_categories SET views='81' WHERE id=20; Load time so far: 0.35 seconds. Performing query: SELECT id,name,parent,validated,description,time,parentnames,parentids,numlinks,hide,lastlinktime,custom,lastedit,moderators,headerinfo,related,numsub,type,permissions,subscribers,subscriber,mixtypes,isalbum,orderlinks,totalcomments,ulsearchmax,ulsearchquery,ulsearchadult,alias,catcols,linkcols,dmozpath,sponsorlinks,views,customwrap FROM wsnlinks_categories WHERE parent=20 AND validated=1 AND hide=0 AND isalbum=0 ORDER BY name ASC LIMIT 0,100; Number of rows is 100 for Resource id #44 Load time so far: 0.81 seconds. Performing query: SELECT id FROM wsnlinks_links WHERE catid=20 AND hide=0 AND validated=1 ; Number of rows is 0 for Resource id #45 Load time so far: 1.94 seconds. Performing query: SELECT id FROM wsnlinks_links WHERE catid=20 AND validated=1 AND hide=0 AND type='regular' ; Number of rows is 0 for Resource id #46 Load time so far: 3.09 seconds. Performing query: SELECT id FROM wsnlinks_links WHERE catid=20 AND hide=0 AND validated=1 ; Number of rows is 0 for Resource id #47 Load time so far: 3.09 seconds. Performing query: SELECT id FROM wsnlinks_links WHERE catid=20 AND validated=0 ; Number of rows is 0 for Resource id #48 Load time so far: 4.27 seconds. Performing query: SELECT id FROM wsnlinks_comments WHERE catid=20 AND validated=0 ; Number of rows is 0 for Resource id #49 Load time so far: 4.35 seconds. Performing query: SELECT COUNT(*) FROM wsnlinks_sessions WHERE 1=1 AND (catid=20 AND memberid>0) ; Load time so far: 4.35 seconds. Performing query: SELECT id,memberid,location,time,ip,browser,starttime,catid,threadid,areaname FROM wsnlinks_sessions WHERE 1=1 AND (catid=20 AND memberid>0) ORDER BY time DESC LIMIT 0,100; Number of rows is 0 for Resource id #52 ---------------------------------------------------- Also, i see the queries for the userlists and aliases. I have switched both off in the switches, but they are still there. How to eliminate them too ? Thank you !
Rating
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5
0/5 based on 0 votes.
Ownership Philarmon
Views 472 views. Averaging 0 views per day.
Similar Topics
Submission Date Apr 13, 2005 - 1:04 PM