Re:A query had to go
by andrewfromx on Tuesday June 06, 2017 @02:13PM
(#14499589)
hey feel free to checkout the golang code here https://github.com/activityclub/pointspaced it's way more versatile than sql for our needs. BTW the #{id} we call .to_i on it first so ruby will make that 0 if it's a string with a single quote or something.
[ Parent
| on HN ]
I've had only a cursory look, but it really feels as if you're reinventing database indices.
Indices are based on the same logic, i. e. "99% are reads, let's try to do more work on writes".
Redis is great. But to be honest: so is MySQL. If you give MySQL enough RAM and create the right indices, you can easily get to 6-digit numbers of queries per second.
Re:A query had to go
by andrewfromx on Tuesday June 06, 2017 @04:19PM
(#14500923)
Re:A query had to go
by packetized on Tuesday June 06, 2017 @03:23PM
(#14500350)
That sounds like a recipe for disaster, if that's the only thing you're relying on for input validation of #{id}.
Re:A query had to go
by andrewfromx on Tuesday June 06, 2017 @03:34PM
(#14500457)
what do you mean. "wefwkefjwe'".to_i will goto zero every time. How is sql injection possible if I to_i your string?