Bug #89551 Spatial index query time performance scales linearly
Submitted: 6 Feb 2018 9:27 Modified: 6 Feb 2018 13:05
Reporter: Sveta Smirnova (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7.21, 8.0.4 OS:Any
Assigned to: CPU Architecture:Any

[6 Feb 2018 9:27] Sveta Smirnova
Description:
Spatial index query execution time scales linearly depending from how much rows result set returns.

How to repeat:
Download uploaded dump, run attached test and check results.

On my machine:

78 rows - 0.12 sec
1365 rows - 6.28 sec
36455 rows - 33.72 sec
111305 rows - 2 min 30.49 sec
145724 rows - 5 min 17.55 sec
[6 Feb 2018 9:28] Sveta Smirnova
Test queries

Attachment: sp_queries.sql (application/sql, text), 22.59 KiB.

[6 Feb 2018 9:28] Sveta Smirnova
Results on my machine

Attachment: sp_queries_result_upstream_5721.txt (text/plain), 26.70 KiB.

[6 Feb 2018 10:42] MySQL Verification Team
Hello Sveta,

Thank you for the report.
I see you have uploaded 2 files sp_bug.sql.gz(this is corrupted as extract fails) and mysql-bug-89551.sql.gz(download in progress as it is in GBs). Could you please confirm which is the correct dump file? Thank you!

Regards,
Umesh
[6 Feb 2018 10:44] Sveta Smirnova
mysql-bug-89551.sql.gz is the correct one.
[6 Feb 2018 13:05] MySQL Verification Team
Thank you, Sveta.

Thanks,
Umesh
[6 Feb 2018 13:06] MySQL Verification Team
test results - 5.7.21

Attachment: 89551_5.7.21.results (application/octet-stream, text), 28.43 KiB.

[12 Feb 2020 14:10] Patrick van Dijk
How can this have severity S3 (non-critical).
Any app trying to render and use MBRIntersects is useless.
This should be treated S1