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