Sponsored Content
Full Discussion: MySQL Performance Problems
The Lounge What is on Your Mind? MySQL Performance Problems Post 303042001 by Neo on Wednesday 11th of December 2019 12:03:53 AM
Old 12-11-2019
Just shaved about 200ms from the mysql query used on the user badge page for each user by adding a field in the user database to store the total tag count for each user and moving that query to a daily cron file instead of updating this in real time.

Code:
<?php
$sql = "select userid, count(1)  as tagcount  FROM tagthread group by userid order by tagcount desc";
$taginfo = $vbulletin->db->query_read($sql);
while ($tag = $vbulletin->db->fetch_array($taginfo)) {
    $sql2 = "update user set tagcount = " . $tag['tagcount'] . " where userid = " . $tag['userid'];
    $vbulletin->db->query_write($sql2);
}

 

4 More Discussions You Might Find Interesting

1. AIX

Performance and paging problems

... a disk drive to be 100% busy? hdisk0 100.0 1.3K 342.7 1.3K 22.0 PgspIn 651 % Noncomp 75.5 hdisk1 100.0 1.3K 320.2 1.2K 20.0 PgspOut 6 % Client 75.5 It's really slowing down performance on my system and I would like to know what is causing this. ... (2 Replies)
Discussion started by: bbbngowc
2 Replies

2. SCO

CPU Performance Problems on VMWARE

hi We have migrated SCO 5.0.6 into ESX4, but the VM eats 100% of the virtual CPU. Here is top print from the SCO VM: last pid: 16773; load averages: 1.68, 1.25, 0.98 02:08:41 79 processes: 75 sleeping, 2 running, 1 zombie, 1 onproc CPU states: 0.0% idle, 17.0% user,... (7 Replies)
Discussion started by: ccc
7 Replies

3. AIX

AIX 5.3 performance problems

Hello, I encounter some performance issues on my AIX 5.3 server running in a LPAR on a P520. How do I investigate performance issues in AIX. Is there any kind of procedure that takes me to the steps to investigate my server and find the sub systems that is causing the issues? The performance... (1 Reply)
Discussion started by: petervg
1 Replies

4. Programming

Xlib - Rotation and interpolation of pixmap - Performance problems

I need to rotate a pixmap in XLib with some kind of interpolation to reduce the aliasing. I came up with the following code, which uses bilinear interpolation. It works fine: the rotated image looks perfect, but unfortunately it takes 5 or 6 seconds for each rotation. (in a 300x300, 16 colours... (5 Replies)
Discussion started by: mghis
5 Replies
utmpd(1M)																 utmpd(1M)

NAME
utmpd - user accounting database daemon SYNOPSIS
DESCRIPTION
user accounting database daemon, manages the user accounting database which is the database of currently logged-in users. This was previ- ously maintained by and files on HP-UX. Upon startup, writes its pid to the file Applications can add, update, or query entries into the database using the APIs. See the getuts(3C) manual page for more information. utmpd(1M) takes care of synchronizing the legacy file and its own in-memory database. The synchronization is bi-directional from the data- base to the and from the file to database. However, this synchronization does not happen in real time. There is a time lag which could span from a few seconds on a lightly loaded system to a few minutes on a heavily loaded system. Signal Processing Perform graceful shutdown. This causes the daemon to write its in-memory user accounting database to the file and exit. DIAGNOSTICS
logs error messages to the system log using syslog(3C). WARNINGS
If is shutdown using synchronization between file and the file does not take place. should not be shutdown by the user unless it is for debugging purpose. On restart, utmpd(1M) rebuilds its database from the file. AUTHOR
was developed by Hewlett-Packard Company. FILES
SEE ALSO
rlogind(1), telnetd(1), who(1), init(1M), bwtmps(3C), getuts(3C), getutx(3C), btmps(4), utmp(4), utmpx(4), wtmps(4). utmpd(1M)
All times are GMT -4. The time now is 09:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy