4 ms·
Someone found out they could write a stored procedure that produces XML. Then they found that you could nest them in one larger query and each could independen
by hobs 3y ago
Someone found out they could write a stored procedure that produces XML.
Then they found that you could nest them in one larger query and each could independently return its own node in the XML, cool right?
Then they found out you could correlate the queries, making it oh so easy to extend and build out!
Then they built an entire insurance business on the gigabytes of XML they crapped out every day, which based on their business processes needed to get sent out once a day.
The process took more time, but it was ok, they had plenty of hours to spare in the day.
People kept adding though, feature requests kept coming in, and tech debt came piling in.
A few years later, they called me because their process had started failing, it was taking over 24 hours on the biggest EC2 instance they could afford, and of course this was a single instance commercial database.
I took a look and it was the worst pile of nested SQL I had ever seen, over 300k LOC of pure XML/SQL hell all nested together, the query plan broke the client - over 100MB.
I told them there was nothing I could do, they should _start over_.
- hermitcrab 3y agoDid they go bust before they managed to rewrite it?
- hobs 3y agoThey fired the CTO and managed to rewrite it, still going strong as far as I know.