A delete statement on a federated table (on server A) takes about 300 seconds (only 20k rows) whereas the same delete statement takes 0.3 seconds called on the actual table (server B). I don't find any documentation or discussion on why this would have very slow performance. The select on both tables (original and its federated table) takes the same amount of time. Is there a known bug or reason for why a delete on a federated table is a bad idea?
Asked
Active
Viewed 302 times
1 Answers
0
FEDERATED
is not built for speed. The delete may actually be doing it one row at a time.
If practical, consider this workaround:
On the target machine, build a Stored Procedure that does a DELETE
. Construct it based on parameters provided, and have it SECURITY INVOKER
.
Maybe MariaDB's FEDERATEDX
does a better job.

Rick James
- 135,179
- 13
- 127
- 222