News for hackers. Stuff that matters.
Re:Why we're ending support for MySQL by Spivak on Wednesday July 03, 2019 @08:07AM (#20343537)
Yeah, I think it's funny that they're claiming that MySQL can't represent a tree structure performantly. What they should have said instead is that their db structure assumes the existence of WITH RECURSIVE and they don't want to change it.
Re:Why we're ending support for MySQL by johannes1234321 on Wednesday July 03, 2019 @08:13AM (#20343575)
MySQL supports WITH RECURSIVE.

https://dev.mysql.com/doc/refman/8.0/en/with.html#common-tab...

(I'm on the MySQL team)

Re:Why we're ending support for MySQL by Someone on Wednesday July 03, 2019 @04:02PM (#20348174)
FTA: ”In July of 2017 GitLab documented that we would be deprecating support for MySQL”

According to Wikipedia, MySQL 8 was released about a year later, in April 2018 (there was also “MySQL Server 8.0.0-dmr (Milestone Release)”, in September 2016, but scanning https://lists.mysql.com/announce/1106 and the two other parts, that didn’t seem to have CTE’s)

Re:Why we're ending support for MySQL by mutt2016 on Wednesday July 03, 2019 @08:54AM (#20343866)
I miss the OG team, pre Sun acquisition. Not sure if you were a part of it, but a solid group to be sure.
Re:Why we're ending support for MySQL by johannes1234321 on Wednesday July 03, 2019 @09:30AM (#20344092)
I joined October before the Sun deal was announced
Re:Why we're ending support for MySQL by Spivak on Wednesday July 03, 2019 @09:16AM (#20344007)
True, but it's an 8.0+ feature. It looks like from the thread that they needed to support older versions as well. Seems odd to drop all of MySQL rather than have a min. version. The more you pry in the thread the more it seems like their developers already wanted to drop MySQL and just wanted an excuse.
Re:Why we're ending support for MySQL by johannes1234321 on Wednesday July 03, 2019 @10:15AM (#20344440)
> they needed to support older versions as well.

Apparently they don't need the support from their pov at all. If will is there they could build up MySQL 8. MySQL 8 is out for a while and ahs seen good testing in different production workloads.

> developers already wanted to drop MySQL and just wanted an excuse

This seems to be the true reason. And it's valid. Supporting many variations of systems and architectures is hard. Supporting combinations you don't use yourself, while using something else intensively is hard.

Personally I think a system like this would benefit from many of the recent replication improvements in MySQL 8, which help in scaling and HA. But I'm obviously biased ;)

Re:Why we're ending support for MySQL by plopz on Wednesday July 03, 2019 @04:39PM (#20348527)
Random aside, do you know when MySQL will finish the spatial stuff? I saw MySQL 8 had SRID support but when I tried to use it I just got messages that said it was not yet implemented.
Re:Why we're ending support for MySQL by nryeng on Thursday July 04, 2019 @05:40AM (#20353035)
Hi! I'm the team lead for the team doing spatial support in MySQL. Thank you for trying the spatial features in MySQL! :-)

We do indeed have SRID support, but there are still some functions that only support Cartesian spatial reference systems. Is that what you're thinking about? I'm curious to know which functions you're trying to use that don't support your use case.

We are working to close these holes. In many cases it involves extending Boost Geometry (the library that we use) with more geographical computations, and that is hard and time consuming work. But we're doing it. The work we have to do to support it in MySQL once it's in Boost Geometry is pretty simple and straight forward.

Since extending Boost Geometry is such a time consuming task, people not working on those tasks have time to extend MySQL in other directions, maybe giving the impression that we're avoiding adding the missing parts. But it's just a result of some task being simple and fast to implement, while others (especially adding geography support) are more long running. In any case, the result is an uneven trickle of new functionality in more or less every new version of MySQL.

I hope that explains a bit what you're seeing. We are filling in the blanks, but it takes time to get to 100%.

Re:Why we're ending support for MySQL by plopz on Friday July 05, 2019 @09:13AM (#20362249)
I don't remember exactly, we had points and polygons in 4326 and were trying do things like distance/intersects/area. Count me in as eagerly awaiting full support of SRIDs.
Re:Why we're ending support for MySQL by nryeng on Friday July 12, 2019 @04:45AM (#20419239)
MySQL 8.0.16 supports all those.

Geographic ST_Distance is currently limited to points and multipoints because of limitations in Boost Geometry, but we've got that fixed in Boost now, so full type support should soon arrive also in MySQL.

Re:Why we're ending support for MySQL by johannes1234321 on Wednesday July 03, 2019 @04:56PM (#20348703)
I did quite some work with MySQL+srid, mostly with OpenStreetMap data, but also other, but I'm no expert there. Maybe your specific SRID wasn't supported? (While a huge number is supported)

Norvald has a few slide sets, which might be good addition to docs: https://www.slideshare.net/mobile/NorvaldRyeng There are also blogs on https://mysqlserverteam.com/category/gis/

Without details about your experiments it's hard to find the issue ...

Re:Why we're ending support for MySQL by oconnor663 on Wednesday July 03, 2019 @09:41AM (#20344172)
The nested set pattern is fine for making tree reads fast, but it makes tree writes expensive, because it's not actually a tree. Is there some other pattern that emulates WITH RECURSIVE without blowing up the cost of writes? If not, then it's quite literally true that MySQL (pre 8.0) can't represent a tree structure performantly.
Re:Why we're ending support for MySQL by dspillett on Wednesday July 03, 2019 @12:08PM (#20345595)
> Is there some other pattern that emulates WITH RECURSIVE

You could use an association matrix.

Or cached paths, but that has a list of disadvantages that make me consider it an anti-pattern these days (I maintain a legacy system that uses this model a lot).

> without blowing up the cost of writes?

It is a long time since I went over the relative performance of common operations on these structures, so I'll not try compare them (some research for you, dear reader!).

The performance of updates to an association matrix depend largely on the depth of the forest: when adding a new node you insert one row per level it is away from its trees root. Removing or moving a leaf node is the same amount of deletes or updates respectively. Moving a branch node can be pretty expensive as you have to make changes to the matrix for all the nodes under it.