maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #02349
Re: stored programs
With local MariaDB 10.0.13. out put from SQLyog "Messages"in erface:
http://faq.webyog.com/content/8/147/en/how-shall-i-understand-the-_query-execution-time_-that-sqlyog-gives-me.html
*1 queries executed, 1 success, 0 errors, 0 warnings*
*Query: SELECT BENCHMARK(50000000, (SELECT 1))*
*1 row(s) returned*
*Execution Time : 0.267 sec*
*Transfer Time : 0 sec*
*Total Time : 0.267 sec*
Yes, I recently had a terrific machine. Intel socket 1155 (2 threads per
core) 4 cores 3.5 Ghz,32 MB RAM. :-)
GPU is nothing particlar. It is a 512 MB DDR2-RAMGeforce card (used in
order to achive 2560*1440 screen resolution , what the intel CPU graphics
does not provide.
-- Peter
On Tue, Mar 3, 2015 at 2:28 PM, Justin Swanhart <greenlion@xxxxxxxxx> wrote:
> You probably have either a faster CPU or bigger cache on your cpu. How
> long does benchmark select 1 take? You should find it is faster on your
> system too, right?
>
> --Justin
>
> Sent from my iPhone
>
> On Mar 3, 2015, at 6:18 AM, Peter Laursen <peter_laursen@xxxxxxxxxx>
> wrote:
>
> Your 3rd test case takes 2:02 in MariaDB 10.1 and 2:13 in MySQL 5.6 on my
> system (when otherwise idle) .
>
> -- Peter
>
> On Tue, Mar 3, 2015 at 1:58 PM, Federico Razzoli <federico_raz@xxxxxxxx>
> wrote:
>
>> I made some quick test to show what I mean by "performance problem". Note
>> that I'm not saying the the first and the second test cases should perform
>> equally. But there is too much difference - see the conclusion.
>>
>> 1)
>>
>> MariaDB [test]> SELECT BENCHMARK(50000000, (SELECT 1));
>> +---------------------------------+
>> | BENCHMARK(50000000, (SELECT 1)) |
>> +---------------------------------+
>> | 0 |
>> +---------------------------------+
>> 1 row in set (0.42 sec)
>>
>> 2)
>>
>> DELIMITER ||
>> CREATE FUNCTION f()
>> RETURNS TINYINT
>> BEGIN
>> RETURN 1;
>> END ||
>> DELIMITER ;
>>
>> MariaDB [test]> SELECT BENCHMARK(50000000, (SELECT f()));
>> +-----------------------------------+
>> | BENCHMARK(50000000, (SELECT f())) |
>> +-----------------------------------+
>> | 0 |
>> +-----------------------------------+
>> 1 row in set (2 min 5.70 sec)
>>
>> 3)
>>
>> DELIMITER ||
>> CREATE FUNCTION f(x TINYINT)
>> RETURNS TINYINT
>> BEGIN
>> RETURN x;
>> END ||
>> DELIMITER ;
>>
>> MariaDB [test]> SELECT BENCHMARK(50000000, (SELECT f(1)));
>> +------------------------------------+
>> | BENCHMARK(50000000, (SELECT f(1))) |
>> +------------------------------------+
>> | 0 |
>> +------------------------------------+
>> 1 row in set (3 min 35.20 sec)
>>
>> -- Conclusions:
>>
>> Times in seconds:
>>
>> 0.42
>> 125.70
>> 215.20
>>
>> I don't know which ratio would be acceptable, but the difference betweem
>> a trivial query and a trivial function is too high.
>> Also, the difference between 2) and 3) is that the function in 3) accepts
>> and returns a parameter. Again, the performance difference seems to me too
>> high.
>>
>> Regards
>> Federico
>>
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~maria-discuss
>> Post to : maria-discuss@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~maria-discuss
>> More help : https://help.launchpad.net/ListHelp
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help : https://help.launchpad.net/ListHelp
>
>
References