query – Include taxonomy in search queries

(Pretty new to WordPress, but I'm a React / NodeJS developer)

I have a basic search function that will search a custom post_type (listings).

It uses the built-in standard get_search_query and therefore it can only find the title of a listing – We want the search to also search the taxonomy.

The search URL looks like this: http://localhost:8888/?s=New+York&post_type=listings – Basic.

The post_type=listings is defined as a hidden entry in the form, e.g.

We each have their own taxonomy listing e.g, location and tag,

Googling for a long time can not find a custom taxonomy by just adding extra tags – at least taxonomy is not so magical and I would have to script my functions.php.

Do you have suggestions on where to start writing a custom query?

WordPress queries

I have custom post products and I have product1, product2, product3 post.
I have created custom taxonomies like customtaxonomies1, customtaxonomies2 and customtaxonomies3. When creating products, I need to select custom taxonomy terms such as terms1, terms2, and terms3.

Now, the customer asks to display the entire product based on the following conditions.

1] The user selects the term from customtaxonomies1 >> term1.
2] The product should be from customtaxonomies2 [All products with AZ order], then customtaxonomies3 [All products with AZ order], then customtaxonomies4 [All products with AZ order], then customtaxonomies5 [All products with AZ order] etc. are displayed.

Please suggest me. Your help will be valuable to me.

html – queries specific PHP and SQL fields to pass them into a table

I have my selection, which brings me the following:

QUERY SELECT: My PHP driver uses "sqlsrv" because I have sqlserver2014

$query = "Select (Sucursal),Year((ETA)) Anio,month(ETA) As 'Mes',count(*) AS 'cuenta'
FROM (TablasTest).(dbo).(RepCostos)
where (Facturado) like 'NO FACTURA%' and year(ETA)=year(GETDATE())
Group by (Sucursal),Year((ETA)),month(ETA)
ORDER BY Sucursal";

Here I show the information my query brings:

Sucursal    Anio    Mes numeroDEcuenta
Air         2019    8   1
Air         2019    9   5
CGLLC       2019    6   1
CGLLC       2019    9   1
CUSMX       2019    5   1
Guadal      2019    11  4
LRTD        2019    11  8
MEX         2019    1   2

I want PHP to retrieve the data and pass it to my table.

Search Results – Should a retail site always return the same items for identical search queries from different users?

We supply a large number of products for purchase through our website. There's a new initiative to use a third-party AI product to hijack search queries to return products based on both the search term and forecasts from the browsing history and other people's search history for successfully processed sales. When I search for a keyword now, I get back a different product group than if someone else is looking for the same product. If I pass a URL of my search to a friend to compare the products, we have different lists, so we can not discuss. The list I find is changing day by day on my own computer because of the AI's suggestions.

Is this a design "no-no"?

Should the AI ​​be used only for referrals and not for core search results?

Is there a guideline that makes suggestions in this regard?

I have also set this up: software recommendations

SQL Server – To prevent LCK_M_IX from waiting / locking for the following delete and paste queries

Given the following table structure, records are inserted continuously with the update_time of a very recent datetime. A separate connection to the DB periodically truncates old records with dates older than 2 weeks.

Table structure:

table structure

The following insertion is very often done with different values:

Insert instruction

The following deletion statement is repeated until required. Then, a selection is made to see if the operation is complete

delete top(5000) from trade_options with (READPAST) where update_time < ''

The activity monitor indicates that the deletion is locked and the insert is waiting (LCK_M_IX):

Picture of the activity monitor

Thank you very much

SQL Server – Need help concurrently running current queries running

I need help with understanding if there's a problem with the very high CPU usage on my read-only server. Read-only means that this server is secondarily read-only through LS, and the DW team can run any type of Crapy query that runs for hours.

Issue – Primary LS Server is primarily OLTP and its vendor-based product, which avoids clustered indexes because DB, as the primary LS, undergoes extensive writes throughout the day. Secondary level recovery occurs once a night and users are DC for that time. For the rest of the day, there are always selected queries.

Index optimization is quite difficult here (no vendor support) because the primary index can not run with many indexes like CI or more NCIs. Therefore, most of the tables read on the secondary page go through the table scan or the key search.

For read-only servers with the following configuration

Logical processors = 80
Total RAM= 512, MAX=440
Numa node =4
MAXDOP=8 and CTOP=5 ( i know this is too low but setting this to even 100 on this server does not work , per my analysis sub tree cost of most of the queries on this server is over 1000 avg)

Now come at most 6-10 of these crappy queries and run in parallel. The CPU utilization is usually 90%. Users do not complain a lot because they do not take care of questions that take more than 4 hours.
But from a server point of view, I think it's not good, especially when 10-15 of them start together and the CPU goes down 100% and I'm afraid the server will fail.

Since index optimization is not currently included, I should increase MAXDOP by 16, because on average, there are 600 worker threads of 2944 available for these queries to execute quickly, or should they be lowered to 4 or 6 to match them lower CPU usage?

CXPACKET waits are the highest wait time with 95% of the average wait time for the last week.

From a storage perspective: Pending memory allocations are mostly 0, but pending average is 30-35 and PLE is an average of 1000, but will be too low at 100 if these parallel queries are executed

mysql – Are there any tools that support sending, validating, approving, and running database queries?

We are a very small e-commerce company. More often than not, data in our MySQL database must be corrected manually by executing SQL queries. In our setup is 1 database administrator. He is currently overwhelmed with the manual execution of queries and must be available every day for a portion of the day to run queries.

I'm looking for a database query management tool that can:

  1. Allows an end user (sender) to initiate a database query execution request
  2. Allows a DBA (auditor) to audit a database query and approve / reject a query
  3. Executes an approved query in the selected database and e-mail the results to the sender and reviewer.

A very simple tool can be created in-house, but the scope of the engineering team is not available.

mysql – Unexpected slow queries

Use of LEMP on popular virtual cloud service servers with MyISAM tables.

The problem is that sometimes once in a matter of hours, simple MySQL queries (choose from, from where) run for several seconds (5 to 9) instead of milliseconds (.002) as in other times.

MySQL slow.log has these records:

Polling time: 5.369666 Blocking time: 0.000120 …

error.log is empty and there is nothing special in other system logs

Such slow queries are sent sequentially to multiple databases and tables, so the value for table lock and lock_time in slow.log also does not matter.

I activated the general protocol, but there was nothing strange. Just regular queries so that I can not find any correlation. I also did not find out memory or CPU leak. It seems that sometimes MySQL puts a lot of strain on it and slows it down.

What can be the reason for such tips of MySQL slowdown and how can you find out?

How are segment trees used to answer interval stitch queries?

I am new here and algorithms in general. I have a question that bugs and I have searched Google without fruitful results unfortunately.

Can someone explain to me how segment trees are used to answer interval stitch queries? I have searched and searched and come only with the beginning of the line.
I understand that I have to take all the endpoints of each interval and create a segment tree. So what?

How can we now know the original intervals? How can we check if there is a specific point in one of them and report all these intervals with the point in them?

Thanks in advance!

Database – 8 – To create a query node that queries content with more than one comment

Consider this example:

  $query = Drupal::entityTypeManager()->getStorage('node')->getQuery();
  $nids = $query->condition('type', 'question')
    ->condition('status', 1)
    ->condition('field_category', $tid)
    ->sort('created', 'DESC')
  $questions = Drupal::entityTypeManager()->getStorage('node')->loadMultiple($nids);

I just want to query the questions with answers. (these are comments)
I was hoping to add ->condition('comment_node_question.0.comment_count', '0', '>') would work, but no luck.