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)
-   -   Improve performance on thread view updating (https://vborg.vbsupport.ru/showthread.php?t=78232)

dwh 04-19-2005 03:50 PM

For some reason, lately when I post here, the spaces get pulled out and words are stuck together. I have no idea why.

WebMasterAJ 04-20-2005 12:23 AM

I just installed this... so far so good :cool:

tp214 04-23-2005 07:25 AM

did the edits keep getting this

Code:

Database error in vBulletin 3.0.7:

Invalid SQL: INSERTINTOthreadviewsaggregate SELECT threadid , COUNT(*)ASviewsFROM threadviews GROUP BY threadid
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERTINTOthreadviewsaggregate SELECT threadid , COUNT(*)ASview

mysql error number: 1064

Date: Saturday 23rd of April 2005 03:25:03 AM
Script: http://www.v3gamer.com/forums/admincp/cronadmin.php?do=runcron&cronid=2
Referer: http://www.v3gamer.com/forums/admincp/index.php?
Username: admin
IP Address: xx.xx.xx.xxx


tp214 04-23-2005 07:27 AM

nevermind!

this is the correct code...

Code:

error_reporting(E_ALL & ~E_NOTICE);

if (!is_object($DB_site))
{
        exit;
}

$DB_site->query("INSERT INTO ". TABLE_PREFIX ."threadviewsaggregate SELECT threadid , COUNT(*) AS views FROM " . TABLE_PREFIX . "threadviews GROUP BY threadid");
$DB_site->query("DELETE FROM " . TABLE_PREFIX . "threadviews");

$DB_site->query(
        "UPDATE " . TABLE_PREFIX . "thread,". TABLE_PREFIX ."threadviewsaggregate
        SET ". TABLE_PREFIX ."thread.views = ". TABLE_PREFIX ."thread.views + ".TABLE_PREFIX."threadviewsaggregate.views
        WHERE ". TABLE_PREFIX ."thread.threadid = ". TABLE_PREFIX ."threadviewsaggregate.threadid");
$DB_site->query("DELETE FROM ". TABLE_PREFIX ."threadviewsaggregate");

log_cron_action('Thread Views Updated', $nextitem);


LambHyjoo 04-28-2005 12:43 PM

Hi, and first of all thank you for this release.

I was just wondering if it is normal that the "threadviewsaggregate" table remains empty ?

Link14716 05-01-2005 01:52 PM

Quote:

Originally Posted by LambHyjoo
Hi, and first of all thank you for this release.

I was just wondering if it is normal that the "threadviewsaggregate" table remains empty ?

Yes, because it is only used when threadviews is being updated.

LambHyjoo 05-02-2005 07:05 AM

Ok, thanks for the answear ;)

RichieBoy67 05-03-2005 01:36 AM

How about a downloadable text file with edits @ instructions???

djwins 05-07-2005 08:25 PM

So, is the best code in the first post, or am I supposed to use one of the other users contributions?

Also, I am running mySQL 4.0.24. Will this work with my version?

Thanks!

dsboyce8624 05-08-2005 05:15 AM

Okay, I'd like to try this, but AdminCP says I don't have permission to execute queries. I tried pasting the create table stuff into the MySQL command box, but it said I needed to specify a datavase. I don't know the sytax so I couldn't.

A little help here please.


All times are GMT. The time now is 06:11 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.01106 seconds
  • Memory Usage 1,742KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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