1

Topic: Parallel performance of requests

Kind time of days
There is such a task
On one script some requests sequentially are fulfilled and results will be formulated

<? php
$sql1 = "SELECT *...";
$data1 = mysqli_query ($conn, $sql1);
...
$sql2 = "SELECT *...";
$data2 = mysqli_query ($conn, $sql2);
...
$sql3 = "SELECT *...";
$data3 = mysqli_query ($conn, $sql3);
...
?>

It is possible as that will be fulfilled parallely by these requests

2

Re: Parallel performance of requests

It is possible to try fork () + connections from different users. Certainly, if tables used in two another requests for any reason are not blocked by the first request.

3

Re: Parallel performance of requests

vkle, and what for from different users?
Still pthread it is possible to use.

4

Re: Parallel performance of requests

SBS Soft;
Precisely it is impossible to unite all requests in one, say, through union even if it would be necessary to increase because of it an amount of columns?

5

Re: Parallel performance of requests

Hett wrote:

vkle, and what for from different users?

Can and I am mistaken, till now considered that  sequentially fulfills requests of one user. I.e. during each moment of time only one request is active. Not?

6

Re: Parallel performance of requests

vkle wrote:

it is passed...
Can and am mistaken, till now considered that  sequentially fulfills requests of one user. I.e. during each moment of time only one request is active. Not?

Precisely is not present. As a rule one application works from under one user, at us some analytical requests "hang" hours. Otherwise all of them .

7

Re: Parallel performance of requests

Hett wrote:

at us some analytical requests "hang" hours. Otherwise all of them .

it is probable, this moment is sense to consider or specify separately. At me were until recently . And, that they "all ", was necessary to drag requests of the appropriate unit about execution from the separate muskul-user. Probably, the engine of tables, structure of requests, something else matters.

8

Re: Parallel performance of requests

I had to a type that, $sql1 was fulfilled on the processor #1, $sql2 on the processor #2, $sql3 on the processor #3
It is possible so to organize

9

Re: Parallel performance of requests

mysql itself does not understand on what processors to it to fulfill? smile

10

Re: Parallel performance of requests

SBS Soft wrote:

I had to a type that, $sql1 was fulfilled on the processor #1, $sql2 on the processor #2, $sql3 on the processor #3

For guaranteed such sharing it is necessary to put three separate  servers under MySQL. It is possible single-processor. Well and three connections, accordingly. Each request to send on the server. smile)) smile)) smile))
And on one server  and OS without you will solve, where what request to execute.
It what for is necessary to you?
Try to describe explicitly the initial task, instead of the method of its decision. Well also explain, than does not arrange serial performance of requests.

11

Re: Parallel performance of requests

... Only do not say  that the request can  both on the first and on the second and even on all kernels

12

Re: Parallel performance of requests

He not spoke about kernels, he spoke about separate processors.

13

Re: Parallel performance of requests

It is necessary to specify concept "processor", in licenses  and  the kernel is meant the processor.
If it is a question of really different sockets how numa the machine will work as the second processor with the storage, addressed for the first? (It to work that will be finite, only it is necessary to you?)

14

Re: Parallel performance of requests

vkle wrote:

....
Try to describe explicitly the initial task, instead of the method of its decision. Well also explain, than does not arrange serial performance of requests.

For formation of principal page web application some requests sequentially are fulfilled
On more exact on the main thing to page some charts by results of requests are formed
img
And it demands where those 25-30 seconds (sometimes on more)

15

Re: Parallel performance of requests

It is not pleasant to you that requests one-for-other are fulfilled too long so I understand.
Then other question, about volumes of the initial data for sampling. From what sources sampling - from source codes in hundred thousand or millions lines or from aggregated, containing more or less prepared statistical data considerably smaller volumes becomes?
In practice the first method normally to what good (except good brakes) does not conduct. In this sense it is much more favourable to make one or several additional tables on everyone  in a context of queried data. As them to fill with the data is already separate song.
Well and if the initial data for sampling is aggregated and has made volumes, and brakes, nevertheless, take place, then there is a sense to pay attention to indexes of tables and plans of requests.
PS: the Picture under the link does not open.

16

Re: Parallel performance of requests

SBS Soft wrote:

On more exact on the main thing to page some charts by results of requests

That such "chart" in the given context are formed?
If it is separate images they are already requested parallely.
If this one image which can be divided into independent parts it is necessary to divide and they are requested parallely.

17

Re: Parallel performance of requests

miksoft wrote:

If it is separate images they are already requested parallely.

Perhaps, it is necessary to add a little. In this variant if in server scripts session it should is used  it is closed, at least, for the period of execution of a long-playing part of a script. Otherwise the mechanism of sessions PHP builds requests from a web client in queue.