vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   mYvBindex v3.1 (https://vborg.vbsupport.ru/showthread.php?t=44691)

350Chevy 12-03-2002 10:59 PM

No problem.. I had another poll running before that didn't use the vB software and worked fine. If anything I'll just slap that puppy in there in place of the current poll.. ;)

Thanks for the suggestion. I never would have thought of that. And I must say you've helped me greatly. Much more help from you than anyone on any other forum! Many thanks! :D

350Chevy 12-03-2002 11:23 PM

I added your name and a link to your website in the footer on the main page to give you credit for the main page and for all the help. :)

Tigga 12-03-2002 11:35 PM

No problem at all. I never mind helping when I have the time. And thanks for the link. :)

When I checked the time it takes for a poll on my test server that query was done in about 0.002 seconds. The only thing I can think of at the moment is maybe you have another hack installed that's affecting it?
You can try replacing the query:
PHP Code:

$pollinfo=$DB_site->query_first("SELECT poll.*,thread.* FROM poll LEFT JOIN thread ON (thread.pollid = poll.pollid) WHERE thread.forumid='$pollsforum' ORDER BY poll.dateline DESC LIMIT 1");{ 

With this one here:
PHP Code:

$pollinfo=$DB_site->query_first("SELECT poll.pollid,poll.question,poll.dateline,poll.options,poll.votes,poll.active,poll.numberoptions,poll.timeout,poll.multiple,poll.voters,thread.pollid,thread.open FROM poll LEFT JOIN thread ON (thread.pollid = poll.pollid) WHERE thread.forumid='$pollsforum' ORDER BY poll.dateline DESC LIMIT 1");{ 

The original query tells the script to select all columns from the thread and poll tables. The new one tells it to only select the fields that are really necessary. Normally it selecting a couple of extra fields shouldn't be a problem, but I guess it could be in this case. Anyways, try that and see if it helps any and if not I'll try to figure out something else.

350Chevy 12-03-2002 11:41 PM

nah.. still at 3.6 seconds.. no problem.. I'll add the code in there to show my old poll.. I think it may have something to do when I upgraded from phpBB to vB. My forums and threads are way off as you could tell with the forum ID's being in the 100's. My post ID's are in the 100,000's! :D

Everything runs fine it's just the post and forum ID's are set really really high and I have no idea on how to drop them down. More than likely that's the cause. I'll play around with adding the old poll. For now I need to throw some steaks on the Bar-B. :)

Tigga 12-03-2002 11:56 PM

I was kind of wondering why the forumid #'s were so high. I still don't see why that would affect the way the poll functions, but then again I've never imported phpbb into vb, so I don't know much about the way it does it. Oh well, enjoy your steaks! :)

350Chevy 12-04-2002 01:57 AM

with your new changes...

Query: SELECT poll.pollid,poll.question,poll.dateline,poll.optio ns,poll.votes,poll.active,poll .numberoptions,poll.timeout,poll.multiple,poll.vot ers,thread.pollid,thread.open FROM poll LEFT JOIN thread ON (thread.pollid = poll.pollid) WHERE thread.forumid='108' ORDER BY poll.dateline DESC LIMIT 1
Time before: 0.20889496803284
Time after: 2.7886350154877

table type possible_keys key key_len ref rows Extra
poll ALL 94 Using temporary; Using filesort
thread ALL 5235 where used

--------------------------------------------------------------------------------

table type possible_keys key key_len ref rows Extra
pollvote ref userid userid 8 const,const 1 where used

--------------------------------------------------------------------------------

Query: SELECT * FROM thread WHERE open='1' AND open<>10 AND forumid=85 OR forumid=88 OR forumid=93 OR forumid=96 OR forumid=101 OR forumid=86 OR forumid=87 OR forumid=89 OR forumid=90 OR forumid=91 OR forumid=92 OR forumid=94 OR forumid=95 OR forumid=97 OR forumid=98 OR forumid=99 OR forumid=100 OR forumid=107 OR forumid=102 OR forumid=103 OR forumid=104 OR forumid=105 ORDER BY lastpost DESC LIMIT 10
Time before: 2.8690160512924
Time after: 3.2530399560928

350Chevy 12-04-2002 02:01 AM

hmm.. it's still using all 5000+ threads...??

Tigga 12-04-2002 02:37 AM

I'm not quite sure if I follow you about it using all 5000 threads... The first query looks the way it should, though I'm still not sure why it would be taking so long to execute. The other query there is from the latest threads part of the hack where it is checking each forum.

If you want to try something else, you can try replacing the poll query with this on here:
PHP Code:

$pollinfo=$DB_site->query_first("SELECT poll.pollid,poll.question,poll.dateline,poll.options,poll.votes,poll.active,poll.numberoptions,poll.timeout,poll.multiple,poll.voters FROM poll ORDER BY poll.dateline DESC LIMIT 1");{ 

See what the time is like with that one and if it isn't improved, then try this one here:
PHP Code:

$pollinfo=$DB_site->query_first("SELECT thread.pollid,thread.open FROM thread WHERE thread.forumid='$pollsforum' ORDER BY thread.dateline DESC LIMIT 1");{ 

Neither of those will actually fix the problem or let the poll work properly, but the first one leaves out the call to the thread table, and the second one leaves out the call to the poll table. If either of those improves the time then we know which table it's taking so long to query and will at least know a little more about what's causing it. Also, if the first query reduces the time, I may be able to work around calling the thread table.

350Chevy 12-04-2002 03:01 AM

ok.. I'll post the times in a second. :)

350Chevy 12-04-2002 03:07 AM

Results of the first line were quick...

Query: SELECT poll.pollid,poll.question,poll.dateline,poll.optio ns,poll.votes,poll.active,poll .numberoptions,poll.timeout,poll.multiple,poll.vot ers FROM poll ORDER BY poll.dateline DESC LIMIT 1
Time before: 0.20555102825165
Time after: 0.20668196678162

table type possible_keys key key_len ref rows Extra
poll ALL 94 Using filesort


All times are GMT. The time now is 12:57 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03648 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete