MySQL event scheduler waiting on empty queue since server restarted 12 days ago

I noticed a process on the server which has been running for more than 12 days, which I think coincides with the last time MySQL was restarted.

mysql> SHOW FULL PROCESSLIST;  +---------+-----------------+-----------+------+---------+---------+------------------------+-----------------------+ | Id      | User            | Host      | db   | Command | Time    | State                  | Info                  | +---------+-----------------+-----------+------+---------+---------+------------------------+-----------------------+ |       5 | event_scheduler | localhost | NULL | Daemon  | 1098372 | Waiting on empty queue | NULL                  | | 1774483 | root            | localhost | NULL | Query   |       0 | starting               | SHOW FULL PROCESSLIST | +---------+-----------------+-----------+------+---------+---------+------------------------+-----------------------+ 2 rows in set (0.00 sec) 

There are no events, and I haven’t attempted to created any.

mysql> SELECT * FROM information_schema.EVENTS;  Empty set (0.00 sec) 

This is actively using up to 8% of my server’s CPU.

Is there a way of determining what this is, or why it was started? Will this try to run every time I restart MySQL? If so, what is it ‘waiting’ for and do I need to tweak my configuration at all to prevent this?

MySQL 8.0.21

MongoDB running sum over 3 days per ID

I have the following json file (small sample) which consists of purchase records of 4 different customers across different dates. I am required to use MongoDB/nosql to identify which customers have made at least a total of 8 new purchases over a consecutive period of 3 days.

In this case, customer ABC made 32 total purchases from 2020-05-01 to 2020-05-03 (3 consecutive days). Customer GHI also had 20 purchases from 2020-07-28 to 2020-07-30 (3 consecutive days). So my output should only contain customers ABC and GHI. What would be the code to get the output? Many thanks!

{"cust_id":"ABC", "date":"2020-05-01", "new_purchase":2},  {"cust_id":"ABC", "date":"2020-05-02", "new_purchase":16},  {"cust_id":"ABC", "date":"2020-05-03", "new_purchase":14},  {"cust_id":"ABC", "date":"2020-05-04", "new_purchase":0},  {"cust_id":"ABC", "date":"2020-05-05", "new_purchase":5},  {"cust_id":"DEF", "date":"2020-05-11", "new_purchase":3},  {"cust_id":"DEF", "date":"2020-05-12", "new_purchase":0},  {"cust_id":"DEF", "date":"2020-05-13", "new_purchase":0},  {"cust_id":"DEF", "date":"2020-05-14", "new_purchase":0},  {"cust_id":"DEF", "date":"2020-05-15", "new_purchase":1},  {"cust_id":"GHI", "date":"2020-07-28", "new_purchase":0},  {"cust_id":"GHI", "date":"2020-07-29", "new_purchase":3},  {"cust_id":"GHI", "date":"2020-07-30", "new_purchase":17},  {"cust_id":"GHI", "date":"2020-07-31", "new_purchase":0},  {"cust_id":"GHI", "date":"2020-08-01", "new_purchase":1},  {"cust_id":"JKL", "date":"2020-06-04", "new_purchase":7},  {"cust_id":"JKL", "date":"2020-06-05", "new_purchase":0},  {"cust_id":"JKL", "date":"2020-06-06", "new_purchase":0},  {"cust_id":"JKL", "date":"2020-06-07", "new_purchase":0},  {"cust_id":"JKL", "date":"2020-06-08", "new_purchase":0},  {"cust_id":"JKL", "date":"2020-06-08", "new_purchase":2} 

Cheap Web Hosting Instant Activation | 30 Days Money Back!

A lot of people wonder and they always have main query that if cheap hosting companies are any good and if you can really trust them with your website for hosting and our answer is “Yes”. There are so many cheap web hosting providers in the industry but Raisinghost.com is perfect and best than others. Raisinghost offers cheap web hosting instant activation starting from reasonable cheaper price ie $0.5 Per Month and its included with the features like unlimited web space, unlimited website traffic, one click installer, cPanel as control panel, free migration services, seo tools, free auto ssl certificate, free lets encrypt ssl, 99.9% uptime, 30 days money back guarantee and much more.

We have both types of web hosting plans ie hard disk drive based and solid state drive based. We have comparatively cheaper pricing than the competitors and all plans are refundable, so its our uniqueness and which can help us to go with the purchase without any hassle. We have also 24×7 live chat and support ticket support available for our clients and its our duty to resolve all queries or complaints raised by clients. We guide with all technical and non-technical hosting related concepts and that helps clients to settle few attempts. Lets try our service and speed up your valuable website.

Cheap Web Hosting Instant Activation – Features :

– Reliable, affordable and most demanding hosting plans
– Daily backups
– SSD / HDD Web space starting from $0/5 Per Month
– 30 Days Money Back Guarantee
– Instant Activation
– SEO Tools
– Stat Programs
– SSL Certificates
– Lets Encrypt SSL
– Single Click Script Installer
– Easy Upgrades
– max email accounts
– max ftp accounts
– max subdomains
– max MySQL databases
– Web Site Builder
– SSH / Terminal Access

https://raisinghost.com/low-cost-hdd-hosting.php

Thank you.

CEO wants to terminate fifty developers (three developers each month with the interval of ten days) based on the lowest test scores

XYZ Soft is facing a big loss in the industry. Therefore, the company has started to offload its software developers. It started to conduct a test of hundred developers on daily basis and store their test scores in a data structure. After ten days, its CEO wants to terminate fifty developers (three developers each month with the interval of ten days) based on the lowest test scores.

Suppose you are working as a most senior developer in the company then which of the following data structure you will recommend to the CEO in the above given scenario.

  1. 1.  AVL Tree 
  2. 2.  Heap 

Justify your answer with solid reason.

Is there really no “Usenet” these days? Why has everything died out? [closed]

I got onto the Internet after the Eternal September of 1993. I thus never got to experience a time when there was some kind of minimal quality/intelligence in everything posted. Usenet has since at least the year 2000 been a useless ghost town filled with spam, if even that, and no ISP that I know of has been providing even one lousy Usenet server for the last 20+ years now.

It’s not just dead, but has long since been fully turned into dirt and forgotten.

I find that maybe 1/10 questions I ask on Stack Exchange get a useful answer from somebody who knows something, is interested to help, is able to help and actually did read my question. The other 90%, I just sit and waste my time carefully writing a question and jumping through all kinds of annoying hoops to get to finally post it, only to have it closed, deleted or downvoted into oblivion two microseconds after it’s been published. This happens over and over and over, with zero intention by me to do anything but genuinely ask real questions.

Even if Usenet would still exist, it’s no longer possible to register an e-mail account anonymously (no, that which you’re thinking of doesn’t work anymore), and it’s not even possible to pay (with Bitcoin). They all demand to fully track you. But either way, it doesn’t matter since Usenet is dead and I’m not talking about using e-mail anyway.

I’m talking about the idea of a decentralized (not fake-decentralized) network where you can exchange messages and not have to rely on and be terrorized by a central authority with "user accounts" which inevitably can only be registered by "IP addresses that we like" and "verified with SMS/photo id/blood sample".

I want to be able to fire away a JSON with a "title", "body" and "category" strings to somewhere, and then later get to "reap" replies to this message by similar means. No accounts or hoops. Spam would be handled by each user or by connecting to "hubs" that do such processing, for those who can’t or won’t do it themselves.

This would be great, but I’ve not seen anything like it even proposed. I feel utterly crippled and muffled. The only thing which exists now seems to be centralized nonsense services which are impossible to register an account on for anyone who cares to even a minimal extent about their privacy.

Why has everything died out? What’s stopping all these people who have infinitely more resources than I from actually launching such a thing and really promoting it to people like us at first? To get some kind of decentralized message system which doesn’t require mysterious and incomprehensible software and only has two people using it?

For starters, they could simply have a .php script hosted on some https:// URLs and have them exchange incoming messages with each other, as well as let anyone download the (recent) messages sent to them. Wouldn’t that be a super-simple and very doable network?

Why is this not a thing? Why do I have to rely on (fully) centralized services run by extremely dubious people? Why is there not even a theoretical chance of getting a message out into "cyberspace" anymore, through a system identical or similar to what I’ve just described?