Java multiple threads run multiple methods, why is it only a little faster than a single thread?

Nov.19,2021

FutureTask.get seems to be a blocking method.


how much faster is "faster"?
if the operation is already very fast, the speed improvement brought by multithreading will be limited, or even make the operation slower
what thread pool is the pool in the code? If the number of threads is small, it may not be able to give full play to the advantages of multithreading, and if the number of initialization threads is relatively small, the code will have the overhead of creating threads at run time

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ebb97b-4863c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ebb97b-4863c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?