Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-09-2010, 01:51 AM
Arianna's Avatar
Arianna Arianna is offline
Dev Staff
 
Join Date: Sep 2009
Posts: 334
Gender: Female
Credits: 33,287
Arianna will become famous soon enough
Default RE: Anyone care to enlighten me as to why 188 queries are used on a page?

I don't have any additional mods installed, and after going through the script I realized that it was selecting every single adoptable (select * from adoptables) and only then checking (with three queries a piece, of course) if it could be adopted.

I think that the problem is, generally, is that for every adoptable it is calling canadopt($aid, "showing", $promocode), which is 3 queries a piece. As for myadopts, the problem is getcurrentimage($id), because this takes a query per pet. I'm working on editing the code now, but since I have so many modifications already (to reduce queries :P) I'm not sure I'll share it.

The query tracking was done by me, but it's really simple - $query_list[] = $query; $query_count++; is inserted after every query (regexes were helpful for putting them in) and when I show the page, I echo all of them. A page without any additional queries is 6 queries, 5 of which are 'select * from users where username = {$username}'. xP
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Making Stats Page = Click Page & Lineages? squiggler Questions and Supports 2 02-22-2014 04:42 AM
Adopt Page & Pound Page change? tahbikat Questions and Supports 3 02-14-2014 03:19 PM
Troubles with queries pachoofoosh Questions and Supports 4 08-05-2013 11:32 AM
Question about Queries? Tsuntsun Questions and Supports 2 11-03-2011 01:57 PM
MySQL queries ..? Quillink Questions and Supports 3 07-11-2009 11:47 AM


All times are GMT -5. The time now is 02:20 PM.

Currently Active Users: 4074 (0 members and 4074 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636