Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sgarland
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
331.
▲
by
sgarland
10mo ago
Perhaps this is my bias coming through. I work with DBs day in and day out, and the main problem I face is performance from poorly-designed schemas and queries; next largest issue is referential integrity violations causing undefined behavi
332.
▲
by
sgarland
10mo ago
I have never seen anyone post an actual example of the German Tank problem creating an issue for them, only that it’s possible. > I don’t have to think about it And here we have the main problem of most DB issues I deal with on a daily b
333.
▲
by
sgarland
10mo ago
The implication is that you need to know the PK ahead of time so that you can insert it into other tables which reference it as an FK without waiting for it to be returned, which further implies that you don’t have FK constraints, because t
334.
▲
by
sgarland
10mo ago
Sounds like a lot of referential integrity violations.
335.
▲
by
sgarland
10mo ago
For InnoDB-based DBs that are not Aurora, and if the secondary index isn’t UNIQUE, it solves the problem, because secondary non-unique index changes are buffered and written in batches to amortize the random cost. If you’re hashing a gu
336.
▲
by
sgarland
10mo ago
IME, when performance issues become obvious, the devs are in growth mode and have no desire / time to revisit PK choice. Integer PKs were seen as fine for years - decades, even - before the rise of UUIDs.
337.
▲
by
sgarland
10mo ago
There are plenty of ways to deal with that. You can shard by some other identifier (though I then question your table design), you can assign ranges to each shard, etc.
338.
▲
by
sgarland
10mo ago
Yes, and for Postgres, it also causes WAL bloat due to the high likelihood of full page writes.
339.
▲
by
sgarland
10mo ago
Assuming the integer value is the PK, it can in fact be much faster for MySQL / MariaDB due to InnoDB’s clustering index. If it can do a range scan over the PK, and that’s also the ORDER BY (with matching direction), congratulations, t
340.
▲
by
sgarland
10mo ago
> Permanent identifiers should not carry data. Did you read the article? He doesn’t recommend natural keys, he recommends integer-based surrogates. > A prime example of premature optimization. Disagree. Data is sticky, and PKs especia
341.
▲
by
sgarland
11mo ago
I know this will come across as a trope, but a calculator doesn’t seem to me to be at the same level as AI in most circumstances. If we’re talking about grade school children who are learning multiplication, then yes, a calculator is unhelp
342.
▲
by
sgarland
11mo ago
> how taxes worked Given that I worked with people well before the advent of LLMs who had no idea how marginal tax rates worked, it seems like we should be more aggressively pursuing this as an educational goal.
343.
▲
by
sgarland
11mo ago
First of all, the entire post reads like it was written by AI. Secondly, the author / prompter misses the point entirely with this closing paragraph: > The next time a teacher complains about AI cheating, ask: If a machine can do th
344.
▲
by
sgarland
11mo ago
Wait until you find out about network endianness.
345.
▲
by
sgarland
11mo ago
Forgive me, I didn’t watch the videos: is that what the Dream Router supports - normal wired WAN uplink, plus 5G failover? If so, yes, that’s very attractive. I have a T-Mobile backup home internet plan, and when I had a rack set up, it was
346.
▲
by
sgarland
11mo ago
So you’re saying, do something like this? 1. Index-only scans on t_product.{category,color} indices, summing each value 2. Lookup the names of those values in their parent tables, generate output rows If so, I suspect there are two reasons
347.
▲
by
sgarland
11mo ago
Nobody does 4 until they’ve had multiple large incidents involving DBs, or the spend gets hilariously out of control. Then they hire DBREs because they think DBA sounds antiquated, who then enter a hellscape of knowing exactly what the root
348.
▲
by
sgarland
11mo ago
If you want to pray before your meal, that doesn’t affect me. If we’re eating together and you want to pray before your meal, I can stay respectfully silent for 30 seconds, because it’s not that much to ask. If you insist I join you in pray
349.
▲
by
sgarland
11mo ago
One difference, IMO, is that in technical forums / chat rooms, flaming was generally (modulo Torvalds, but honestly I give him a pass - the guy has to keep the level of quality excruciatingly high at all times, and that must be tiring)
350.
▲
by
sgarland
11mo ago
ProxySQL has a more simplified version of this, but it’s transparent to the client. Since it’s constantly monitoring the cluster, it knows what replica lag is at any given time. If you send a request to a read replica, it holds the request
351.
▲
by
sgarland
11mo ago
For the love of all that’s holy, please stop doing read-after-write. In nearly all cases, it isn’t needed. The only cases I can think of are if you need a DB-generated value (so, DATETIME or UUIDv1) from MySQL, or you did a multi-row INSERT
352.
▲
by
sgarland
11mo ago
Every time I see stuff like this (Google’s new SQL-ish language with pipes comes to mind), I am baffled. SQL to me is eminently readable, and flows beautifully. For reference, I think the same is true of Python, so it’s not like I’m a Perl
353.
▲
by
sgarland
11mo ago
Thanks for giving me yet another reminder that I’m old. I caught the reference immediately and thought nothing of it, and then this shattered that. The early ‘00s were a wild time. Intel boldly stating they expected to get the P4 up to 10 G
354.
▲
by
sgarland
11mo ago
It certainly looks like the author has given careful thought to making this performant, but I am skeptical about it at scale. While OT means there should be fewer updates than CRDT, you still wind up with a fair amount of them, and you have
355.
▲
by
sgarland
11mo ago
I use em dashes for the same reason that I use semicolons: it’s how I’m hearing the sentence in my head as I’m typing it. I think it’s a bit of a stretch to call a part of grammar pompous. It’d be analogous with me calling your post lazy du
356.
▲
by
sgarland
11mo ago
Nah, I’ll agree with parent: they’re objectively bad. They turn what could be IPC into network calls, and because everything uses frameworks and ORMs, it’s all slow as hell. “We can move faster” (but at the cost of our product being slower)
357.
▲
by
sgarland
11mo ago
The benchmarks were just that - synthetic benchmarks. I’ve ran actual production workloads against both, and Aurora never won. IFF you have an incredibly write-heavy workload, and you have few to no secondary indices, then Aurora might
358.
▲
by
sgarland
11mo ago
Because a. People by and large don’t run their own benchmarks b. Aurora does legitimately have some nice features, though a lot of them are artificially restricted from RDS (like the max volume size). The biggest cool thing Aurora MySQL doe
359.
▲
by
sgarland
11mo ago
Except it isn’t nearly as fast as it claims [0]. And in real-world tests, I have never found it to beat RDS. You can get an insane amount of performance out of a well-tuned MySQL or Postgres instance, especially if you’ve designed your sc
360.
▲
by
sgarland
11mo ago
You can use __slots__ for normal classes; it’s not limited to only dataclasses.
More ›