Skip to main content
fixed typo
Source Link
John K. N.
  • 18.3k
  • 14
  • 54
  • 115

A simple explanation to your question is the a logical abstraction. What is faster?

1. Parallel Execution

  1. Analyse query
  2. Determine which index to use
  3. Split the query into parallel reads
  4. Consolidate query results
  5. Present consolidated data

2. Serial Execution

  1. Analyse query
  2. Start retrieving data (serial)
  3. Present data

Your Queries

A simple SELECT <column> FROM <table>; will be faster and the most cost-effective with a serial execution. It's already buffering data to the dataclient before the second option has even started splitting the query into parallel threads/tasks.

However, a SELECT MAX(<column>) FROM <table>; will benefit from parallel execution, because each thread will be able to retrieve the MAX(<column>) value from a portion of the table and then pass that on to the client.

BTW, what were the execution times for the SELECT MAX() ... statement?

A simple explanation to your question is the a logical abstraction. What is faster?

1. Parallel Execution

  1. Analyse query
  2. Determine which index to use
  3. Split the query into parallel reads
  4. Consolidate query results
  5. Present consolidated data

2. Serial Execution

  1. Analyse query
  2. Start retrieving data (serial)
  3. Present data

Your Queries

A simple SELECT <column> FROM <table>; will be faster and the most cost-effective with a serial execution. It's already buffering data to the data before the second option has even started splitting the query into parallel threads/tasks.

However, a SELECT MAX(<column>) FROM <table>; will benefit from parallel execution, because each thread will be able to retrieve the MAX(<column>) value from a portion of the table and then pass that on to the client.

BTW, what were the execution times for the SELECT MAX() ... statement?

A simple explanation to your question is the a logical abstraction. What is faster?

1. Parallel Execution

  1. Analyse query
  2. Determine which index to use
  3. Split the query into parallel reads
  4. Consolidate query results
  5. Present consolidated data

2. Serial Execution

  1. Analyse query
  2. Start retrieving data (serial)
  3. Present data

Your Queries

A simple SELECT <column> FROM <table>; will be faster and the most cost-effective with a serial execution. It's already buffering data to the client before the second option has even started splitting the query into parallel threads/tasks.

However, a SELECT MAX(<column>) FROM <table>; will benefit from parallel execution, because each thread will be able to retrieve the MAX(<column>) value from a portion of the table and then pass that on to the client.

BTW, what were the execution times for the SELECT MAX() ... statement?

Source Link
John K. N.
  • 18.3k
  • 14
  • 54
  • 115

A simple explanation to your question is the a logical abstraction. What is faster?

1. Parallel Execution

  1. Analyse query
  2. Determine which index to use
  3. Split the query into parallel reads
  4. Consolidate query results
  5. Present consolidated data

2. Serial Execution

  1. Analyse query
  2. Start retrieving data (serial)
  3. Present data

Your Queries

A simple SELECT <column> FROM <table>; will be faster and the most cost-effective with a serial execution. It's already buffering data to the data before the second option has even started splitting the query into parallel threads/tasks.

However, a SELECT MAX(<column>) FROM <table>; will benefit from parallel execution, because each thread will be able to retrieve the MAX(<column>) value from a portion of the table and then pass that on to the client.

BTW, what were the execution times for the SELECT MAX() ... statement?