1

Topic: QUERIES

This is my forum footer:

Powered by PunBB
© Copyright 2002?2005 Rickard Andersson
PSP-Downgrades © Copyright 2006?2007

[ Generated in 0.238 seconds, 126 queries executed ]

Why are so many queries being executed in the forum index?

What can be done to fix this?

thanks smile

Re: QUERIES

what mods or changes have you made since installing PunBB? perhaps post your index.php?

Re: QUERIES

I smell subforums.

4

Re: QUERIES

yes I do have subforums installed, but at this time, I only have ONE subforum inside chaT.

Re: QUERIES

Well, to help you we'll need either your index.php, a list of the queries that are run (display of queries is toggled in common.php - be careful not to leave it set on a live site once you get the list, however), or both.

Looking for a certain modification for your forum? Please take a look here before posting.

Re: QUERIES

pogenwurst wrote:

Well, to help you we'll need either your index.php, a list of the queries that are run (display of queries is toggled in common.php - be careful not to leave it set on a live site once you get the list, however), or both.

Just to second this, having both would be excellent, but the list would be easier to analyze smile

7

Re: QUERIES

Sorry, I'll get my index.php up in a sec.

Re: QUERIES

that sec. was an hour ago lol

9

Re: QUERIES

Hee you go:

http://www.sendspace.com/file/mnhvgm

It's just my index.php

10

Re: QUERIES

If you go into /include/common.php, you will see the following at about line 30:

// This displays all executed queries in the page footer.
// DO NOT enable this in a production environment!
//define('PUN_SHOW_QUERIES', 1);

remove the // from the last line so that it reads: define('PUN_SHOW_QUERIES', 1); and save these changes to common.php, then go to your forum index page in your browser, hit refresh and post the output of the stuff down the bottom.

It should enumerate every query that gets run, and then you will have a precise idea of where all those queries were coming from.

After you've done this, put the // back in smile

11

Re: QUERIES

I guess this is you?

http://www.game-warp.com/forums/

I saw 156 queries on the home page when I was there... that's certainly a lot of queries. Normally one sees about 8 on a standard index.php.

12

Re: QUERIES

Yeah I know, that's the site...

I'll post the queries in a sec...

13

Re: QUERIES

Ok here are the queries:

0.00113      SELECT u.*, g.*, o.logged, o.idle FROM pspdowngradesusers AS u INNER JOIN pspdowngradesgroups AS g ON u.group_id=g.g_id LEFT JOIN pspdowngradesonline AS o ON o.user_id=u.id WHERE u.id=3
0.00034     UPDATE pspdowngradesonline SET logged=1176578987, idle=0 WHERE user_id=3
0.00038     SELECT * FROM pspdowngradesonline WHERE logged<1176578687
0.00082     SELECT COUNT(id) FROM pspdowngradesreports WHERE zapped IS NULL
0.00485     SELECT COUNT(id) FROM pspdowngradesmessages WHERE showed=0 AND owner=3
0.00032     SELECT MAX(id) FROM pspdowngradesforums
0.00047     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=0
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00034     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=1
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00035     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=2
0.00702     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49369
0.00038     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=3
0.00689     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49290
0.00035     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=4
0.00693     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49495
0.00047     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=5
0.00738     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49482
0.00092     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=6
0.00706     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49427
0.00034     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=7
0.00697     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49329
0.00036     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=8
0.00699     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49554
0.00036     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=9
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00034     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=10
0.00696     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49451
0.00035     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=11
0.00687     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49513
0.00037     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=12
0.00691     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49551
0.00038     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=13
0.00688     SELECT subject FROM pspdowngradestopics WHERE last_post_id=48989
0.00084     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=14
0.00693     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49540
0.00040     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=15
0.00699     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49525
0.00040     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=16
0.00699     SELECT subject FROM pspdowngradestopics WHERE last_post_id=48300
0.00036     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=17
0.00691     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49556
0.00043     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=18
0.01008     SELECT subject FROM pspdowngradestopics WHERE last_post_id=47161
0.00113     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=19
0.00727     SELECT subject FROM pspdowngradestopics WHERE last_post_id=48121
0.00036     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=20
0.00716     SELECT subject FROM pspdowngradestopics WHERE last_post_id=47396
0.00059     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=21
0.00726     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49415
0.00095     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=22
0.00715     SELECT subject FROM pspdowngradestopics WHERE last_post_id=44473
0.00060     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=23
0.00701     SELECT subject FROM pspdowngradestopics WHERE last_post_id=46697
0.00039     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=24
0.00693     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49538
0.00037     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=25
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00034     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=26
0.00699     SELECT subject FROM pspdowngradestopics WHERE last_post_id=46323
0.00055     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=27
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00030     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=28
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00032     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=29
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00034     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=30
0.00693     SELECT subject FROM pspdowngradestopics WHERE last_post_id=48082
0.00058     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=31
0.00692     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49484
0.00244     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=32
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00032     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=33
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00038     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=34
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00034     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=35
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00033     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=36
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00033     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=37
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00037     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=38
0.00694     SELECT subject FROM pspdowngradestopics WHERE last_post_id=48303
0.00037     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=39
0.00690     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49549
0.00036     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=40
0.00756     SELECT subject FROM pspdowngradestopics WHERE last_post_id=47362
0.00041     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=41
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00035     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=42
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00044     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=43
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00037     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=44
0.00686     SELECT subject FROM pspdowngradestopics WHERE last_post_id=28155
0.00037     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=45
0.00683     SELECT subject FROM pspdowngradestopics WHERE last_post_id=48948
0.00035     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=46
0.00893     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49169
0.00277     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=47
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00036     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=48
0.00710     SELECT subject FROM pspdowngradestopics WHERE last_post_id=48519
0.00038     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=49
0.00720     SELECT subject FROM pspdowngradestopics WHERE last_post_id=48753
0.00034     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=50
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00037     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=51
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00041     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=52
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00047     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=53
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00032     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=54
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00035     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=55
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00033     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=56
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00032     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=57
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00031     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=58
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00037     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=59
0.00689     SELECT subject FROM pspdowngradestopics WHERE last_post_id=32116
0.00038     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=60
0.00883     SELECT subject FROM pspdowngradestopics WHERE last_post_id=38110
0.00063     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=61
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00031     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=62
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00035     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=63
0.00686     SELECT subject FROM pspdowngradestopics WHERE last_post_id=47054
0.00039     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=64
0.00699     SELECT subject FROM pspdowngradestopics WHERE last_post_id=48367
0.00038     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=65
0.00739     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49539
0.00039     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=66
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00031     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=67
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00033     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=68
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00035     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=69
0.00770     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49515
0.00038     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=70
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00049     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=71
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00152     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=72
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00038     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=73
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00075     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=74
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00038     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=75
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00036     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=76
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00070     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=77
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00131     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=78
0.00684     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49542
0.00048     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=79
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00166     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=80
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00267     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=81
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00292     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=82
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00057     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=83
0.01060     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49541
0.00381     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=84
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00035     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=85
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00037     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=86
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00036     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=87
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00034     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=88
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00038     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=89
0.00749     SELECT subject FROM pspdowngradestopics WHERE last_post_id=21548
0.00049     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=90
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00053     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=91
0.00875     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49510
0.00742     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=92
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00989     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=93
0.00733     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49517
0.00054     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=94
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00044     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=95
      SELECT subject FROM pspdowngradestopics WHERE last_post_id=
0.00041     SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=96
0.00986     SELECT subject FROM pspdowngradestopics WHERE last_post_id=49421
0.00292     SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster, f.parent_forum_id FROM pspdowngradescategories AS c INNER JOIN pspdowngradesforums AS f ON c.id=f.cat_id LEFT JOIN pspdowngradesforum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=1) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND (f.parent_forum_id IS NULL OR f.parent_forum_id=0) ORDER BY c.disp_position, c.id, f.disp_position
0.00039     SELECT COUNT(id)-1 FROM pspdowngradesusers
0.00041     SELECT id, username FROM pspdowngradesusers ORDER BY registered DESC LIMIT 1
0.00056     SELECT SUM(num_topics), SUM(num_posts) FROM pspdowngradesforums
0.07012     SELECT COUNT(*) FROM pspdowngradesposts WHERE posted > 1175974187
0.06725     SELECT COUNT(*) FROM pspdowngradesposts WHERE posted > 1176492587
0.00039     SELECT user_id, ident FROM pspdowngradesonline WHERE idle=0 ORDER BY ident
0.01946     SELECT username, id, last_visit from pspdowngradesusers WHERE last_visit >= '1176534000' ORDER by last_visit DESC
Total query time: 0.57495 s

Re: QUERIES

ô.Ô. It seems to me alot of those queries could be grouped into one...

15

Re: QUERIES

What can I do to fix?

16

Re: QUERIES

anyone please?

17

Re: QUERIES

It looks to me like two queries generated by the sub-form mod have somehow run wild.

Most of your 156 queries are queries like

SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM pspdowngradesforums WHERE id=55

These are identical to the query driven by the sub-form mod:

 $forums_info = $db->query('SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, forum_name FROM '.$db->prefix.'forums WHERE id='.$i) or error('Unable to fetch sub forum info',__FILE__,__LINE__,$db->error());

Ditto the query in your sub-forum mod code in index.php

 $subject = $db->query('SELECT subject FROM '.$db->prefix.'topics WHERE last_post_id='.$current['last_post_id']);

that generates the many

SELECT subject FROM pspdowngradestopics WHERE last_post_id=48989

queries.

Those two queries are responsible for about 148 of the 156 queries on your index.php. Something is clearly not working right with that mod smile

Go over to punres.org and check that you have the latest version of this mod, and that you have installed it correctly. Maybe even email or ask the mod author for advice.

Otherwise, un-install it sad

Then save and refresh and see what the query count is.

18

Re: QUERIES

Awww... I really can't be bothered with uninstalling the mod hmm isn't there any other way I can stop all the queries?

19

Re: QUERIES

elbekko wrote:

ô.Ô. It seems to me alot of those queries could be grouped into one...

How do you do that?

Re: QUERIES

You seem to be using an older version of the mod: try using
http://www.sparu.com/other/PunBB/Mods/s … .0.9.1.zip

21

Re: QUERIES

If I used that version the queries will drop?

Re: QUERIES

I have no clue, but you should try it: the code has changed a bit

23

Re: QUERIES

Would I have to uninstall it and then install the new version?

Dang, I wish someone could do it for me sad

Re: QUERIES

Or you could try doing it yourself wink

25

Re: QUERIES

I don't have time I have coursework to do sad

Can't you just quickly just delete the queries throgh phpmyadmin?