May help if the DB engine can't take maximum advantage of available threads. There are two databases in your case but still only one DB engine (the brains) that may or may not be maxing out the available hardware resources. Splitting them into four VMs would ensure that four DB engines are able to work in parallel.Splitting them up even more, in VMs even, wouldnt really solve anything. Each VM instance will still take just as long to update the database as the current setup.
Why are you updating yesterday's total with today's number?Correct. That is how I get the totals for the current update, the days total, yesterdays total, week total, etc...
This is done for each user, host and team.
Err, fixing the workflow is the right solution.May help if the DB engine can't take maximum advantage of available threads. There are two databases in your case but still only one DB engine (the brains) that may or may not be maxing out the available hardware resources. Splitting them into four VMs would ensure that four DB engines are able to work in parallel.
May help if the DB engine can't take maximum advantage of available threads. There are two databases in your case but still only one DB engine (the brains) that may or may not be maxing out the available hardware resources. Splitting them into four VMs would ensure that four DB engines are able to work in parallel.
Why are you updating yesterday's total with today's number?
I know but I kinda like taking quick and dirty shortcutsErr, fixing the workflow is the right solution.
Err, maybe you should just have date and score table and generate the view based on today's date?I'm not, todays total gets moved to the "yesterdays" column at the end of the day. The only thing that gets updated is the current update. That gets added to the todays total. The historical data doesn't get updated, it just gets moved to the appropriate location. IE: Todays total gets moved to yesterdays, yesterdays gets moved to 2 days ago, 2 days ago gets moved to 3 days ago, etc... for 28 days.
This allows the site to display:
Recent Update total
Todays total
Yesterdays total
2 days ago total
Last 7 days total
Last 28 days total
(By total, i mean the amount of points earned in that time period)
How about change the application queries so it knows from user ID which DB instance to send the request to? This way you never have to merge the data.Splitting the database up into separate instances is the fundamental issue I am having here. If I can split the database up into multiple VMs, and it speeds things up, then I can do that with a single instance as well. Which I've already tried splitting the data up into chunks to process concurrently. The problem lies with merging all that data back into a single data set which makes the whole process take 3x longer.
How about change the application queries so it knows from user ID which DB instance to send the request to? This way you never have to merge the data.
what does it mean when a host doesn't have userid field in the xml?
is there a unique ID for the project? or is the 8 character string the ID?It means the user wishes to remain anonymous.
so, are we still doing this or not?
I asked our "professional" team this exact question and they came back with "no, it can't be done with SQL Server".key is to just do delta update as opposed to full.
what? what do you mean it cannot be done with sql server?I asked our "professional" team this exact question and they came back with "no, it can't be done with SQL Server".
God forbid, if they launched a cloud service or something.
"1 month downtime while we move around a few terabytes of data".
"hoooge hoooge data", one of them is fond of saying.
How would I know? That's what they told me. I didn't look into it. I'm certainly not going to look into it for them and do their job. I already found them the article showing how to use SQL Server for IIS session persistence. Before I did that, they were like, it's not possible to do round robin load balancing between two IIS web servers due to session persistence issues. Now that it's working fine, not even a thank you or even an acknowledgement that I showed them the light.what? what do you mean it cannot be done with sql server?
If the query is taking 20 minutes even with the database in RAM, I’d look closely at the query execution plan before investing in faster CPUs. With over 2 million users, sorting and aggregating across all projects could be the real bottleneck. I’d check the indexes, temporary tables, and whether the query is doing unnecessary full-table scans or sorting large intermediate results. Splitting it into four chunks can actually make things slower if each chunk repeats expensive work or requires additional sorting and merging. MyISAM versus InnoDB performance will also depend on the query and table structure. Have you profiled the query to see where most of those 20 minutes are being spent?So I run a decent sized database setup. This database collects Distributed Computing "credits" and other metrics revolving around Distributed Computing projects. It's quick, but I think it can be faster, maybe. So here's what I know about it.
Its 3 databases that stores all the information. One of them is a "static" database that keeps data that doesn't get updated all too frequently. The other two databases is where most all the magic happens. These databases are near identical clones of one another. While one of the database is being updated with new stats the other one is being read by the web server to read the data. When the database being updated is completed, they switch so the other database begins its update and the web server then starts reading from the database that was just updated.
Now there is one particular query that takes ~20 minutes to complete. Its an "overall" ranking that combines everyones scores from all projects then ranks them.
I've tried taking this query and changing the database engine to InnoDB, then splitting the query up into 4 chunks. That's 2M+ users it's ranking, so each one is roughly 500k users it works on. Then it combines them all back into the table in the proper sort order. This took around or more than 45 minutes to do, so I'm looking for ways to optimize the process and canva phone number lookup performance as well.
So I switched it back to MYISAM and one single process to process it.
I'm really not sure of how else I can make this so it works faster.
The hardware is Samsung NVME U.2 1.9TB PM9A3 drives. Each database is stored on it's own drive using symbolic links to achieve this. I've tried putting the entire database in RAM (Over 750GB RAM) to see if that would speed up anything but no change.
The CPUs are a pair of Xeon Gold 6154.
I feel this is a CPU limitation and going with a much faster CPU would see some speed up, but I don't know that it would be very drastic.