标签:database

带有 database 标签的公开 Whisper

划选高亮2026-08-09 19:26:41
原文高亮摘录
Hashing is an example of a space–time tradeoff.
Whisper 随想笔记
But if memory was infinite, why would anyone bother with hashing anyway?
划选高亮2026-08-09 16:32:41
原文高亮摘录
In a well-dimensioned hash table, the average time complexity for each lookup is independent of the number of elements stored
Whisper 随想笔记
Average is the key word—worst case is still a nightmare though.
划选高亮2026-08-09 16:23:41
原文高亮摘录
In a well-dimensioned hash table, the average time complexity for each lookup is independent of the number of elements stored
Whisper 随想笔记
This is why databases use them under the hood for lookups.
划选高亮2026-08-09 16:14:41
原文高亮摘录
In a well-dimensioned hash table, the average time complexity for each lookup is independent of the number of elements stored
Whisper 随想笔记
Depends on the hash function, if it's bad you're back to O(n).
划选高亮2026-07-28 16:33:53
原文高亮摘录
There is built-in syntax to compute a depth- or breadth-first sort column.
Whisper 随想笔记
Finally, no more hand-rolling recursive CTE sorting!
划选高亮2026-07-28 13:30:53
原文高亮摘录
Recursive queries are typically used to deal with hierarchical or tree-structured data.
Whisper 随想笔记
I've seen people do this with loops in app code, but SQL is way more elegant for it.
划选高亮2026-07-28 13:21:53
原文高亮摘录
Recursive queries are typically used to deal with hierarchical or tree-structured data.
Whisper 随想笔记
Yeah, I always reach for recursive CTEs when I need to walk a tree, it's the cleanest way.
划选高亮2026-07-28 10:27:53
原文高亮摘录
WITH provides a way to write auxiliary statements for use in a larger query.
Whisper 随想笔记
I've been using CTEs for years and never thought of them this simply.
划选高亮2026-07-28 10:18:53
原文高亮摘录
WITH provides a way to write auxiliary statements for use in a larger query.
Whisper 随想笔记
So it's like a subquery but you can reuse it multiple times? Nice.
划选高亮2026-07-28 10:09:53
原文高亮摘录
WITH provides a way to write auxiliary statements for use in a larger query.
Whisper 随想笔记
Makes sense, basically temp tables without the cleanup hassle.
划选高亮2026-07-27 13:08:37
原文高亮摘录
these functions return a null value when no rows are selected.
Whisper 随想笔记
Yeah had to learn this the hard way, coalesce is a lifesaver.
划选高亮2026-07-27 12:59:37
原文高亮摘录
these functions return a null value when no rows are selected.
Whisper 随想笔记
Wait, so sum of nothing is null? That's a classic SQL gotcha though.
划选高亮2026-07-27 10:17:52
原文高亮摘录
You can do things by applying a method on a DataFrame or Series
Whisper 随想笔记
Took me a while to get that methods change the data in place sometimes, confusing
划选高亮2026-07-27 10:08:52
原文高亮摘录
You can do things by applying a method on a DataFrame or Series
Whisper 随想笔记
Wish they'd explain which method does what without making me google every time
划选高亮2026-07-27 10:05:37
原文高亮摘录
Aggregate functions compute a single result from a set of input values.
Whisper 随想笔记
This is the line I always come back to when I forget what aggregates do.
划选高亮2026-07-27 09:59:52
原文高亮摘录
You can do things by applying a method on a DataFrame or Series
Whisper 随想笔记
Yeah but the real magic is when you chain like five methods together lol
划选高亮2026-07-27 09:56:37
原文高亮摘录
Aggregate functions compute a single result from a set of input values.
Whisper 随想笔记
Wish they'd show an example here, the docs are too dry for me.
划选高亮2026-07-27 09:47:37
原文高亮摘录
Aggregate functions compute a single result from a set of input values.
Whisper 随想笔记
So basically it's just like SUM or AVG but for any set of values, got it.
划选高亮2026-07-26 10:09:44
原文高亮摘录
A healthy GraphQL API starts with a well-governed schema.
Whisper 随想笔记
We learned this the hard way—our schema was chaos before we added reviews.
划选高亮2026-07-25 13:20:45
原文高亮摘录
The original array can be mutated using the view.
Whisper 随想笔记
Yeah, views are handy for memory but I've been burned by accidental mutations.