amazon rds – rename execution times of rds db vs rds db delete?

Suppose I have an aws rds mysql database called readonly_data, I want to be able to replace this database with a new one, which is restored from a snapshot.

Which of the two methods is the fastest way to remove the name? readonly_data?

  1. Delete the database readonly_data

  2. Rename the database readonly_data to something else

In my opinion, renaming should be a constant-time operation, whereas deleting may depend on database size.

phtml – block execution before modal click

I have a modal with 2 buttons that have a click function. Within each of these click functions is a block that should only be executed when clicked. However, the block appears to be running before clicking on one of the buttons.

keys:[
{
text: $ .mage .__ (`Don & # 39; t Allow`),
Class: & # 39; dontAllow & # 39 ;,
click: function () {
console.log (`I have clicked Don`t Allow`);
                    disableAdminUsage (); ?>
this.closeModal ();
},
},
{
Text: $ .mage .__ (& # 39; Ok & # 39;),
Class Action & # 39 ;,
click: function () {
console.log ("I clicked on Ok");
                    enableAdminUsage (); ?>
this.closeModal ();
},
}
].

query – Mysql + WordPress stops my server (huge CPU usage and slow execution)

I recently installed WordPress on a production server with 80,000 registered users. The problem is that the MySQL database consumes the whole CPU and the server gets too slow. I have disabled all plugins and renamed these plugin folders. The problem is still there.

up, 20:26:55 up 6 days, 16:01, 1 user, load average: 4.42, 4.47, 4.54
Tasks: 192 total, 2 running, 190 sleeping, 0 stopped, 0 zombie
% Cpu (s): 55.2 μs, 3.4 sy, 0.0 ni, 40.7 id, 0.6 u, 0.0 hi, 0.2 si, 0.0 st
KiB Mem: 32639948 total, 239032 free, 8069912 used, 24331004 buff / cache
KiB Swap: 8388604 total, 8375548 free, 13056 used. 23506600 avail Mem.

PID USER PR NI VIRT RES SHR S% CPU% MEM TIME + COMMAND
3957 mysql 20 0 1629756 232200 9344 s 384.1 0.7 106: 23.68 mysqld

I monitored mysql with mysql -u admin -p -e "SHOW full PROCESSLIST". and this query is repeated many times:

| Query | 0 | Statistics | SELECT ID, post_name, post_parent, post_type
FROM wp_posts
WHERE post_name IN (& # 39; wp-content & # 39 ;, & # 39; plugins & # 39 ;, -folder-followers & # 39; assets & # 39; & # 39; js & #; 39 ;, & # 39; um-followers-min-js & # 39;
AND post_type IN (& 39; page & # 39 ;, & # 39; attachment & # 39;) | 0.000 |
| 13489 | mydbnumber1 | localhost | mydbnumber1 | Query | 0 | Copy to the tmp table | SELECT wp_users.user_login FROM wp_users INNER JOIN wp_usermeta ON (wp_users.ID = wp_usermeta.user_id) WHERE 1 = 1 AND (
(
(wp_usermeta.meta_key = & # 39; wp_capabilities & 39; AND wp_usermeta.meta_value LIKE & # 39;% "administrator "% & # 39;)
)
) ORDER BY user_login ASC | 0.000 |

I have searched for this killer code query in all files of the WordPress installation and found only match in the file named: wp-admin includes deprecated.php line 523 .php to the server, but the problem persists !

This is crazy now, I've been researching for 2 days now and I can not find a solution. Could someone help me?

Thank you for reading.

Web applications – Does JavaScript stop the execution of a script when a Web Assembly function is called?

I'm pretty inexperienced in web development, and I'd like to spend a lot of time learning JavaScript and Web assembly, because together they seem to be extremely powerful tools. When structuring my projects, should I assume that the V8 engine simply stops executing code when I execute a WASM function from JS, or is it running at the same time?

java – Ensure thread execution order if read operations must be performed before reading

I am currently designing a server with the following structure:

  • A TCP thread pool that receives data from the network
  • A queue that contains these requests
  • A worker thread pool of fixed size that accepts requests from the queue and performs some work that: a ConcurrentHashMap is read and the results analyzed. After completing the work, the results are placed in a write queue.
  • The write queue stores write requests for ConcurrentHashMap
  • A fixed-length writing thread pool that takes requests from the write pool and writes them to the pool ConcurrentHashMap

Server restrictions:

  • For a specific entry in ConcurrentHashMapA write access is sent to the network several seconds before the read access. The threads must never allow the read to be scheduled before the write occurs.

My previous ideas:

  • First of all, I hope that the three to five seconds are sufficient enough to finish writing before reading
  • Set the writing threads to high priority and the reading threads to low priority
  • A read can check the last write time. If it's big enough (like a few minutes or hours ago), it can ignore the last write because it's outdated. But then it knows that it can not make an informed decision. I could have the thread redo twice if an entry is outdated, but that feels awkward.
  • The write queue has been added so that the TCP pool can be put directly into the write queue (write requests do not have to be processed by the worker pool) instead of in the job queue, while read requests are put in the worker thread queue and then sent some log information later put in the write queue. after the workers pool

Are there ways to make sure that reads are less likely to occur before a write, or are the precautions I've taken are sufficient? Should I use the re-read mechanism?

Is a write queue really needed, or can I use worker threads more generally to handle writes as well? Write order is not important.

windows – Local Website Execution (React / Rails) for Connected Users – some common questions

I'm new to this subforum of Stack, so forgive me if this is not the place to ask these kinds of theoretical questions.

Basically, I have a React / Rails website (postgresql backend) and try to run them locally for some users who are on the same network.

In development, I only used Linux VM and localhost (obviously). I know that I no longer need the VM, but I'm not sure how to set it all up. Windows 10 is running on the "Server" (an older computer with a new 1 TB SSD).

Any simple explanations for a starting point?

SQL Server – Part of the parallel execution plan has a serial part

I have a large linq to sql query that runs in parallel mode.
It returns results in 8 seconds and it's pretty good.
I have found in the execution plan that the rightmost part (from which the execution plan is read) of the execution plan has a serial part.
I checked the execution plan and I see that the serial part calculates some expressions like the where conditions start date and Deadline applied and calculated.
But I do not understand why it's in serial mode.
As you can see on the screenshot, it says Scalar operators[Expr1169] and Scalar operator (expression1170)

As you can see in the next screenshot, the expressions are calculated bit by bit Nested loops the execution goes into parallel mode.
I'm trying to understand the serial part of the query because I've optimized the query a few times to run it only in parallel mode.
I have removed some scalar functions and other DB objects that can cause serial execution.

Screenshot 1
Enter image description here

Screenshot 2
Enter image description here
The anonymized execution plan can be found here.
execution plan

Additional information:

  • Statistics are being updated
  • Index fragmentation is eliminated
  • 96 GB of 128 GB are used by SQL Server.
  • SQL Server 2016

Statistics are being updated.

Terminal / Python: Python is used through the terminal and does not register any changes made to files during execution

I've had a pretty annoying problem lately. Run Python 2.7 from the terminal. When I make a change to a Python or data file in Python (">>> Python"), Python does not seem to see the change and shows the same behavior as if no change had been made. When I quit Python and start again, the change is registered.

Any ideas? I also have Python 3.7 on my Mac. (MacOS Sierra.)

Many Thanks!