PDA

View Full Version : query small but loading slowly, pls help me fixed it


VinavB
12-12-2010, 09:11 AM
SELECT
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate, user.languageid AS saved_languageid,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid,
language.phrasegroup_global AS phrasegroup_global,
language.phrasegroup_posting AS phrasegroup_posting,
language.phrasegroup_postbit AS phrasegroup_postbit,
language.phrasegroup_showthread AS phrasegroup_showthread,
language.phrasegroup_inlinemod AS phrasegroup_inlinemod,
language.phrasegroup_reputationlevel AS phrasegroup_reputationlevel,
language.options AS lang_options,
language.languagecode AS lang_code,
language.charset AS lang_charset,
language.locale AS lang_locale,
language.imagesoverride AS lang_imagesoverride,
language.dateoverride AS lang_dateoverride,
language.timeoverride AS lang_timeoverride,
language.registereddateoverride AS lang_registereddateoverride,
language.calformat1override AS lang_calformat1override,
language.calformat2override AS lang_calformat2override,
language.logdateoverride AS lang_logdateoverride,
language.decimalsep AS lang_decimalsep,
language.thousandsep AS lang_thousandsep

FROM user AS user
LEFT JOIN userfield AS userfield ON (user.userid = userfield.userid)
LEFT JOIN usertextfield AS usertextfield ON (usertextfield.userid = user.userid) LEFT JOIN language AS language ON (language.languageid = IF(user.languageid = 0, 2, user.languageid))

WHERE user.userid = 7

id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE user const PRIMARY,userid,userid_2,userid_3,userid_4 PRIMARY 4 const 1
1 SIMPLE userfield const PRIMARY PRIMARY 4 const 1
1 SIMPLE usertextfield const PRIMARY PRIMARY 4 const 1
1 SIMPLE language const PRIMARY PRIMARY 2 const 1

Time Before: 5.48977 seconds
Time After: 5.65048 seconds
Time Taken: 0.16070 seconds

Memory Before: 2,862.328 KB
Memory After: 2,861.977 KB
Memory Used: -0.352 KB


i dont know query it slowly, whois can help me fix it
thank plssss