MySQL COMPRESS() function runs at client side or server side?

55 Views Asked by At

I am using C API client. When I do an insert command with a COMPRESS() function for one column data, does the client compress the data and send to server ? Or the compression happens at MySQL server side ?

2

There are 2 best solutions below

1
Shadow On

If you mean the compress function that is part of the sql specification for mysql, then as all sql statements, it is executed on the server, so its parameter is sent without compression.

0
Amit Mohanty On

The data is compressed on the MySQL server side during the execution of the SQL query, not by the client before sending it to the server. The client is responsible for sending the data and the SQL query, while the server handles the actual compression and insertion into the database.