You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by akorensh <al...@gmail.com> on 2020/05/28 14:40:29 UTC

Re: Slow query from PHP PDO with auhentication enabled

Hi,
  Queries should not be slower. Send a reproducer project/logs and timings
for queries w/and w/out
  authentication enabled.
Thanks, Alex



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Slow query from PHP PDO with auhentication enabled

Posted by manueltg89 <ma...@hotmail.com>.
But This problem increases when we've authentication enabled.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Slow query from PHP PDO with auhentication enabled

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

I can see how opening new connections may become slower. It is advised to
pool connections.

Regards,
-- 
Ilya Kasnacheev


пт, 29 мая 2020 г. в 12:06, manueltg89 <ma...@hotmail.com>:

> As I've said in my previous message the problem is to open connection with
> cluster, when I've enabled authentication on cluster this process is more
> slow than when I've disabled authentication. After to open connection the
> queries take much o less the same time, but, Is normal that to open
> connection takes much longer time with enabled authentication?
>
> PD: I've tested with PHP THIN CLIENT and It has the same problem.
>
> Thanks in advance.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Slow query from PHP PDO with auhentication enabled

Posted by manueltg89 <ma...@hotmail.com>.
As I've said in my previous message the problem is to open connection with
cluster, when I've enabled authentication on cluster this process is more
slow than when I've disabled authentication. After to open connection the
queries take much o less the same time, but, Is normal that to open
connection takes much longer time with enabled authentication?

PD: I've tested with PHP THIN CLIENT and It has the same problem.

Thanks in advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Slow query from PHP PDO with auhentication enabled

Posted by akorensh <al...@gmail.com>.
Hi,
I am not seeing such differences.
Once an authenticated session is established, the extra processing is
minimal.

Run the following experiment
 use this example (or create your own)
https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcExample.java

 then put in a loop
                    for (int i = 0; i < 100 ; i++) {
                        long before = System.currentTimeMillis();
                         stmt.executeQuery(...);
                        System.out.println("total :" +
(System.currentTimeMillis() - before));

                    }

This will print out the values for 100 iterations.
Do this w/authenticationEnabled and not.

plot the histogram for both cases, and you should see that response time is
identical.

Repeat the same experiment w/php thin client.
use:
https://github.com/apache/ignite/blob/master/modules/platforms/php/examples/SqlExample.php
or make your own.

The results are similar.


Thanks, Alex



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Slow query from PHP PDO with auhentication enabled

Posted by manueltg89 <ma...@hotmail.com>.
I've attached a example project with the problem.

Thanks in advance. ImportedCluster3-project.rar
<http://apache-ignite-users.70518.x6.nabble.com/file/t2878/ImportedCluster3-project.rar>  



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Slow query from PHP PDO with auhentication enabled

Posted by akorensh <al...@gmail.com>.
can you attach a reproducer project that prints out these measurements, and
I'll take a look.




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Slow query from PHP PDO with auhentication enabled

Posted by manueltg89 <ma...@hotmail.com>.
I've reviewed again and the problem is to open connection with the cluster,
when the auth is enabled it is more slow than if is disabled.

Execute time to Open Connection with MySQL 0.011513948440552 seconds

Execute time to Open Connection with Apache Ignite (with auth enabled)
0.069784879684448 seconds
Execute time to Open Connection with Apache Ignite (with auth disabled)
0.0042431354522705 seconds

*Environment: Windows 10 x64
Apache Ignite: 2.8.0
PHP Version: PHP 7.0
PHP PDO*

Too much difference or not?

Thanks in advance.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/