vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBookie - vBulletin Betting Hack (https://vborg.vbsupport.ru/showthread.php?t=65844)

mykes 05-11-2005 06:20 PM

Code:

# Query_time: 977  Lock_time: 455  Rows_sent: 20  Rows_examined: 125192586
SELECT item.item_id, item.item_title, item.threadid, grp.group_title, item.item_
status, item.item_created, item.item_open_until, item.item_pay_after, thread.thr
eadid, thread.forumid, thread.postuserid FROM vbookie_items AS item
                LEFT JOIN vbookie_groups AS grp ON grp.group_id = item.group_id
                LEFT JOIN thread AS thread ON thread.vbookie_item_id = item.item
_id
                WHERE item.item_status='SETTLED'
                ORDER BY  item.item_id DESC
                LIMIT 0, 20;

vBookie locking the thread table for 455 seconds! The whole site stops for that long. Look at how many rows examined! Dang these LEFT JOINs.

Did some digging:

mysql> select count(*) from thread;
+----------+
| count(*) |
+----------+
| 159281 |
+----------+

mysql> select count(*) from vbookie_items;
+----------+
| count(*) |
+----------+
| 844 |
+----------+

I think it scanned the entire thread table about 844 times to do the query, and it created temporary tables to boot.


My fix was to enter the following query:

create index thread_vbookie on thread (vbookie_item_id);

This costs sizeof(MEDIUM_INT)*159281 bytes of RAM to keep the needed field in RAM all the time.

At MEDIUM_INT = 2 bytes, it's 320K. At 4 bytes, it's 640K. Puny amount of memory to save all those table scans.

I'm pretty sure it worked, as I went to the vbookie.php page and did all kinds of sorts and they were instant.

carolmyt 05-11-2005 09:15 PM

Ok, I installed it, with no problems, I hadn't added any events yet, but the page was working. Now, when I click on the link, all I get is a blank white page. the php file is definitely still uploaded, and the link in the navbar is going to the right place, so, what's up?

carolmyt 05-11-2005 09:17 PM

Oh, and this is only when the hack is turned on. When its off, there's a standard 'you can't access this page' message.

djwins 05-12-2005 03:06 PM

Quote:

Originally Posted by hitmanuk2k
Where does one define the start off amount each user gets? I want 100 not 500.

Set the default to 100 in vbookie_cash in the user table in your mySQL db.

Flow Fusion 05-12-2005 07:48 PM

Quote:

Originally Posted by Flow Fusion
OK I got everything to work till I hit submit and then nothing. Anyone have any idea why this is?

A lil help here?

freebase69 05-12-2005 09:11 PM

Ok easy question here...how do you settle an event after the event has ended and you know the outcome? I can't seem to figure this one out and the online manual can't be found.

Thanks

freebase69 05-16-2005 09:41 PM

bump...anyone?

RichieBoy67 05-18-2005 06:37 PM

Is there an uninstaller for this? I need to reinstall the queris

Pain86 05-18-2005 09:45 PM

hi... i have this installed on my forums but when i set which usergroup to be able to bet it just wont let that usegroup bet...

any idea what could be the problem?

i want every usergroup to able to bet on events... so i set "can this usergroup bet on events" to yes...

but when i make an event it says "you may not bet on this event" ?!?!

help please.

T_Montana 05-20-2005 08:57 PM

great hack


All times are GMT. The time now is 08:34 PM.

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.02068 seconds
  • Memory Usage 1,740KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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