0

When in mysql client prompt I execute a query on a table with over 100k rows:

select * from jmeterschema.tabela_inz;

#I just retrieve data from it.

The execution time shown after executing is e.g 0.12sec, yet the prompt to actually retrieve the data needs around few minutes. Hence my question, what is the real time of an execution. Why do these two differ?

I need it because I am doing databases efficiency comparison - I would be grateful for any tips if I am not doing something right. ;)

Cheers

Well I also tried to do it from mySQL workbench and there execution time is around 0.14 ish, which leads me to conclusion that it is the proper time but I am curious still why mysql-cli needs more time to retrieve the data.

Shadow
  • 33,525
  • 10
  • 51
  • 64
  • 1
    You have a TTFR (Time To First Row) which is the execution time. At that time you have a ready cursor. Now you need to *transfer* the data and this depends on how you, the client, do that. If you do it a row at a time, maybe formatting it for console output etc., then the time goes up. You can try using DATA INFILE to dump the output to a file instead of the console and see how time changes. Or CREATE TABLE xxx AS SELECT ..., same reasoning. – LSerni Jul 10 '23 at 20:25
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jul 10 '23 at 22:31

0 Answers0