![]() |
|
Mod Options |
![]() |
|||||||||||||||||||||||
Improve performance on thread view updating
![]() Developer Last Online: Dec 2010 ![]() ![]() ![]() This modification is in the archives.
Per Doc Erwin:
http://www.vbulletin.com/forum/showp...8&postcount=18 I'm releasing this here. I have a suggestion to improve performance although it is for mysql 4.04 and up (I assume at some point a future version of vb will require it). Requirements: MySQL 4.04 If you have a large forum, run mysql 4.04 and up and want to try this, please report back on your results. The way updating threads views works right now, (even though putting it in cron improved things,) you are still going through many queries to the thread table, potentially locking it up while updating views.The current code from threadviews.php is: PHP Code:
With 4.04 you can do a multitable update. FIRST, create the table ONCE ONLY PHP Code:
and in the threadviews.php code change it to PHP Code:
That will reduce the number of queries by however many threads get updated in the cron interval. Additionally, you might be able to skip creating the extra table using subqueries. I haven't gotten around to writing that code yet. If someone wants to add that,mention it in this thread and I'll update the code. Download Now Only licensed members can download files, Click Here for more information. Show Your Support
No members have liked this post.
|
Comments |
#2
|
|||
|
|||
put your codes in [ PHP ] tags please...
also, can you point a real MySQL doc where the example is explained and rated ?!... because i can see your point, as a mysql developper, but many others will discuss it... No members have liked this post.
Last edited by nexialys; 17 Mar 2005 at 00:37. |
#3
|
||||
|
||||
I copied it from vb.com and on preview the php code displayed. I edited it.
On the mysql: http://dev.mysql.com/doc/mysql/en/update.html
No members have liked this post.
|
#4
|
|||
|
|||
ok, no problem btw...
but i would usggest you to release it in the BETA forum instead, because it's in development, not really releaseable on production sites... but maybe you can modify it to have a if statement depending on PHP version we have on our server... No members have liked this post.
|
#5
|
||||||||
|
||||||||
Originally Posted by nexialys
It's actually pretty much of production quality, I'm running this with small changes now. According to dwh's thread at vb.com, he has this hack applied and running, too.
This hack doesn't depend on PHP version, only on MySQL version - anything greater than 4.0 works. My changes are: 1. This string has a typo, there should be a space after "FROM"
2. After applying hack, move this line immediately after the line with INSERT SQL statement:
Reason for this is explained here: http://www.vbulletin.com/forum/showp...4&postcount=16 No members have liked this post.
|
#6
|
||||||||
|
||||||||
Originally Posted by kmike
So what should the full code look like then?
![]() No members have liked this post.
|
#7
|
||||
|
||||
Originally Posted by Boofo
I see it's easier to paste whole file, just without header/footer:
No members have liked this post.
|
#8
|
||||
|
||||
I encouraged dwh to post here.
![]() I may add this to my forum with over 14mil posts... I am always wary of database corruption. ![]() No members have liked this post.
|
#9
|
||||
|
||||
Originally Posted by Erwin
14 million posts???? No ****!
You deserve a beer. Can you PM me your url? Would love to take a look. No members have liked this post.
|
#10
|
|||
|
|||
Erwin's forum is very large
![]() I have this running on my home box with no problems, probbly use this on my production site soon to. ![]() No members have liked this post.
|
#11
|
|||
|
|||
This does look very promising, has jelsoft thought about integrating it into the product?
No members have liked this post.
|
#12
|
||||
|
||||
Yes they are.
I haven't had a chance to develop it yet but using the same principle Ibelieve there are a couple of other places this concept can be used. No members have liked this post.
|
#13
|
|||
|
|||
Thats great news. Now if I can only work up the nerve to upgrade to 3.1.0 when it comes out
![]() No members have liked this post.
|
#14
|
||||
|
||||
Originally Posted by Erwin
WTF ! YEAH I mean the number, 14mil posts is really far off my hands ! OMG !
No members have liked this post.
|
#15
|
||||
|
||||
Installed this and got this error after sometime:
Will uninstall :disappointed: No members have liked this post.
|
![]() |
«
Previous Mod
|
Next Mod
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Mod Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 21:37.