Hot priest under fire after promoting health supplements on social media because 'prayer is not enough'
One pair of jeans is £540, the other is £34.99 from New Look - so can you spot the dupe? Fashion snob LIZ JONES road tests the High Street's best designer lookalikes
Taylor Swift has man arrested at fiancé Travis Kelce's home while trying to serve her deposition papers from Justin Baldoni
Michelin-starred chef sparks authenticity row after adding unlikely ingredient to Bolognese recipe - but he claims it's the traditional way
NASA Introduces 10 New Astronaut Candidates
Read more of this story at Slashdot.
MAFS UK's latest series is the most explosive yet with 'more sex than ever' and producers forced to intervene after 'incredibly shocking' behaviour that left experts 'on the edge of their seats'
I'm a vascular surgeon and there are VERY early signs something is wrong in your body: 'It's whispering to you'
MARTIN BECKFORD: A very bold move, but can Farage's migrant benefits plan really save £230billion?
Tube anarchy! 14 'fare dodgers' push past barriers as staff are nowhere to be seen
CodeSOD: One Last ID
Chris's company has an unusual deployment. They had a MySQL database hosted on Cloud Provider A. They hired a web development company, which wanted to host their website on Cloud Provider B. Someone said, "Yeah, this makes sense," and wrote the web dev company a sizable check. They app was built, tested, and released, and everyone was happy.
Everyone was happy until the first bills came in. They expected the data load for the entire month to be in the gigabytes range, based on their userbase and expected workloads. But for some reason, the data transfer was many terabytes, blowing up their operational budget for the year in a single month.
Chris fired up a traffic monitor and saw that, yes, huge piles of data were getting shipped around with every request. Well, not every request. Every insert operation ended up retrieving a huge pile of data. A little more research was able to find the culprit:
SELECT last_insert_id() FROM some_table_nameThe last_insert_id function is a useful one- it returns the last autogenerated ID in your transaction. So you can INSERT, and then check what ID was assigned to the inserted record. Great. But the way it's meant to be used is like so: SELECT last_insert_id(). Note the lack of a FROM clause.
By adding the FROM, what the developers were actually saying were "grab all rows from this table, and select the last_insert_id once for each one of them". The value of last_insert_id() just got repeated once for each row, and there were a lot of rows. Many millions. So every time a user inserted a row into most tables, the database sent back a single number, repeated millions and millions of times. Each INSERT operation caused a 30MB reply. And when you have high enough traffic, that adds up quickly.
On a technical level, it was an easy fix. On a practical one, it took six weeks to coordinate with the web dev company and their hosting setup to make the change, test the change, and deploy the change. Two of those weeks were simply spent convincing the company that yes, this was in fact happening, and yes, it was in fact their fault.
Married At First Sight UK fans blast experts for 'ANOTHER mismatch' as bride Grace flees the ceremony in tears just minutes after meeting 'lovely' groom Stephen
Why did an SS officer choose to defy Hitler and save the life of an heir to the British throne?
I never want my daughter to see Made In Chelsea. I was walked all over: BINKY FELSTEAD reveals behind-the-scenes heartache, scars she's still in therapy for - and the diagnosis that changed everything
Expert reveals five 'pain free' symptoms of bowel cancer - as cases surge in young people
EV charging biz zaps customers with data leak scare
An electric vehicle charging point provider is telling users that their data may be compromised, following a recent security "incident" at a service provider.…
The 5 Essex villages estate agents say are the best places to live in the county
One of TikTok’s network boffins says it causes ‘massive data wastage’
Before Larry Ellison, Michael Dell and Rupert Murdoch put pen to paper to take over TikTok’s US operations from ByteDance, they might want to consider that one of the Chinese company’s network boffins thinks the app and others like it create “massive data wastage”.…
China tells grumps, trolls, and AIs to stop emoting online
China’s Cyberspace Administration yesterday announced a two-month campaign to quash netizens who “maliciously incite negative emotions”.…