Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Equivalent of oracle's Parallel option in Mysql

In oracle we can create a table and insert data and select it with parallel option.

Is there any similar option in mysql. I am migrating from oracle to mysql and my system has more select and less data change, so any option to select parallely is what i am seeking for.

eg: Lets consider my table has 1 million rows and if i use parallel(5) option then five threads are running the same query with limit and fetching approximately 200K each and as final result i get 1 million record in 1/5th of usual time.

like image 603
DB_learner Avatar asked Mar 23 '23 09:03

DB_learner


1 Answers

In short, the answer is no.

The MySQL server is designed to execute concurrent user sessions in parallel, but not to execute one given user session in several parts in parallel.

This is a personal opinion, but I would refrain from wanting to apply optimizations up front, making assumptions about how the RDBMS works. Better measure the query first, and see if the response time is a real concern or not, and only then investigate possible optimizations.

"Premature optimization is the root of all evil." (Donald Knuth)

like image 194
Marc Alff Avatar answered Mar 24 '23 22:03

Marc Alff