Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sgarland
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
53 ms
·
661.
▲
by
sgarland
1y ago
> "We discovered X about Postgres" is a eng blog cliché by this point. It really is, and it’s often surprising to me how basic some of the issues are being discovered. Like Figma, when they waited a shocking amount of time add
662.
▲
by
sgarland
1y ago
I legitimately don’t understand why a lookup table is ever seen as adding any meaningful amount of complexity. SELECT a.foo, b.bar FROM alpha a JOIN bravo b ON a.id = b.alpha_id The speed hit from an INNER JOIN
663.
▲
by
sgarland
1y ago
Please read source docs instead of relying on LLMs, especially for RDBMS. I’ve found they quite often get something subtly wrong; for example, recommending that the PK be added to a secondary composite index in MySQL - this is entirely unne
664.
▲
by
sgarland
1y ago
Sure, or you make a natural key. Depending on your RDBMS (MySQL and SQL Server cluster rows around the PK) and query patterns, this may be quite a bit faster, to boot. For example, if you have a table with customer orders, you could have a
665.
▲
by
sgarland
1y ago
I’m more upset at how people are so fucking dense about normalization, honestly. If you use LLMs to build your app, you get what you deserve. But to proudly display your ignorance on the beating heart of every app? You have a CHECK constrai
666.
▲
by
sgarland
1y ago
Bear in mind I have a large bias towards performance, and am a DBRE, so I also have strong opinions about normalization. Separating compute and storage means that if you ever have to hit the disk - which is every time for writes, and depend
667.
▲
by
sgarland
1y ago
I own all AoE games, and despite having 3 and 4 installed, I don’t think I’ve so much as launched them. Every time I think “I should try this,” I remember I want to try a new strategy in 2 instead.
668.
▲
by
sgarland
1y ago
Neon has leaned hard into AI and promoting vibe coding, example [0]. I assume they’ve also struggled with uptime, but don’t know. Sam Lambert tweeted this [1], which may or may not (I genuinely have no idea) have been poking at Neon, or may
669.
▲
by
sgarland
1y ago
> PlanetScale, with their latest Metal introduction, optimized for super low latency (they act like they've reinvented the wheel, lol), but they clearly have something in mind going in this direction. I’ve spoken to them personally,
670.
▲
by
sgarland
1y ago
AoE2, baby. Still going strong, decades after launch.
671.
▲
by
sgarland
1y ago
Ah, you’re correct.
672.
▲
by
sgarland
1y ago
> What else is declarative / pure? SQL. Thank you. People so often forget (or don’t realize) that their RDBMS is also doing a ton of optimization on their query, and a primary reason it’s able to do so in real-time is because SQL
673.
▲
by
sgarland
1y ago
They said a status board on top of their monitor, not every corner of their house. This seems like a very unobtrusive signal to me. Plus, some people like to hide or obscure their phone from their field of view during work, to minimize dist
674.
▲
by
sgarland
1y ago
That’s a great idea! I remember on an Android phone - maybe Galaxy Nexus, or the original Pixel - you could blink an LED with different colors for different app notifications. I had blue, yellow, red, and green for various apps, and so with
675.
▲
by
sgarland
1y ago
Most of the time, the arguments aren’t even that cogent, they’re more along the lines of “I’m not going to specify the columns I need from this SELECT query, because that’s premature optimization.”
676.
▲
by
sgarland
1y ago
I know this was an example, but if you get to that point and haven’t swapped out Python’s stdlib json library for orjson or some other performance-oriented library, that’s on you.
677.
▲
by
sgarland
1y ago
IFF you understand computing fundamentals, and IFF you have a solid understanding of DS&A, then yes, this is a reasonable approach. At that point, a profiler will likely show you the last 1% of optimizations you could make. Most web dev
678.
▲
by
sgarland
1y ago
Related, people not understanding that the latency alone from a DB call (especially when the DB has network-based storage, which is most of the cloud offerings) is substantial. I’ve found so many cases where people are unknowingly doing ser
679.
▲
by
sgarland
1y ago
This. OP, tools often install their own update mechanisms (e.g. `uv self update`), so this may not be as useful as you think. As an alternative (albeit one that adds potential hosting costs), consider running a small DB - can be as simple a
680.
▲
by
sgarland
1y ago
OK, fair-ish point. You won’t find major examples, because it’s not a CVE if you willingly download and execute malicious code. I hope you can understand the theoretical (but very real) risks of doing this, though. For me personally, I try
681.
▲
by
sgarland
1y ago
And this is why this exploit mechanism works so well. Most installers are doing the same basic patterns: checking for dependencies, checking the distro, etc. It’s not hard to figure these out and spot them in different scripts.
682.
▲
by
sgarland
1y ago
Python is my favorite language, but I have fully embraced uv. It’s so easy, and so fast, that there is nothing else remotely close. Need modern Python on an ancient server running with EOL’d distro that no one will touch for fear of breakin
683.
▲
by
sgarland
1y ago
Cross-region backup has never made sense to me. If an entire region goes away - not a temporary outage, but GONE - then the country is probably under attack, and absolutely no one will give a shit that your SaaS product is dead.
684.
▲
by
sgarland
1y ago
It's not a strawman, it's reductio ad absurdum. SQL and Python are both languages that are commonly used. It would be (currently; who knows in a few years) laughable if someone said they didn't need to deeply understand Pytho
685.
▲
by
sgarland
1y ago
Fully agree, I just harp on SQL because a. It’s my niche b. It always seems to be a “you can know this, but it doesn’t really matter” thing even for people who regularly interact with RDBMS, and it drives me bonkers.
686.
▲
by
sgarland
1y ago
> getting hierarchical data based on parent_id So, an adjacency list (probably, though there are many alternatives, which are usually better). That’s not complex, that’s a self-join. > trigram functions That’s an indexing decision, no
687.
▲
by
sgarland
1y ago
For reference, I’m a DBRE. IMO, yes, most people can learn basic joins and aggregates in a couple of hours, but that is subjective. > you don’t need to understand the normalizations You definitely should. Normalizing isn’t that difficult
688.
▲
by
sgarland
1y ago
Mostly because you don’t know if it’s correct unless you know SQL. It’s entirely too easy to get results that look correct but aren’t, especially when using windowing functions and the like. But honestly, most queries I’ve ever seen are j
689.
▲
by
sgarland
1y ago
Genuinely do not understand the point of these tools. There is already a practically natural language to query RDBMS; it’s called SQL. I guarantee you, anyone who knows any other language could learn enough SQL to do 99% of what they wanted
690.
▲
by
sgarland
1y ago
Do you have benchmarks at scale, ideally compared to other store / DB implementations? I’ve seen other CRDT libraries using Postgres (inadvisedly) bring it to its knees due to the massive amount of chattiness and updates.
More ›