Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dventimi
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
331.
▲
by
dventimi
3y ago
OK. I dropped the data, recreated it according to the recipe, and re-ran the query. The plan is different, using the index on organization_id rather than on updated_at, but that's to be expected given that the table is clustered diff
332.
▲
by
dventimi
3y ago
Sure. -- 1e7 entries for organization_id = 10 distributed evenly over the 10 -- years after '2020-01-01 00:00:00' as requested insert into foo ( organization_id, created_at, updated_at) select 10, --9
333.
▲
by
dventimi
3y ago
I see how created_at and updated_at are generated here but I don't see how organization_id is being generated. How is that being done? Also, if each page contains data from all organizations then sounds very much like it's not clu
334.
▲
by
dventimi
3y ago
I dumped the data from postgres and loaded into a similar (same name, same columns, in the same order, same columns indexed) it works in much the same way. explain query plan select * from foo where organization_id = 1 order by updated_
335.
▲
by
dventimi
3y ago
With only two indexes, one on organization_id and one on updated_at, for the query select * from foo where organization_id = 1 order by updated_at limit 10 offset 0; I think foo_updated_at_idx is the better choice and not foo_organiz
336.
▲
by
dventimi
3y ago
Without adding that index, what's the correct index to use?
337.
▲
by
dventimi
3y ago
I've not been able to reproduce this behavior. Maybe someone else will have better luck. create unlogged table foo (id int primary key generated by default as identity, organization_id int default floor(random()*10), created_at ti
338.
▲
by
dventimi
3y ago
How is this different from the "tree" command?
339.
▲
by
dventimi
3y ago
Rubbish
340.
▲
by
dventimi
3y ago
Not if your regular application code is in the database
341.
▲
by
dventimi
3y ago
> I know, reading is hard. We're done here.
342.
▲
by
dventimi
3y ago
To educate your adoring fans
343.
▲
by
dventimi
3y ago
> It took SQL well into the 1990s to fully solidify itself as "the standard" for relational querying. IBM had SQL in their database product in 1981, Oracle had it by v4 in 1984, ANSI picked SQL as its standard that same year,
344.
▲
by
dventimi
3y ago
Compare and contrast the query execution stages of PostgreSQL and SQLite. How exactly do they work? Please be as precise as possible. Try to avoid imprecise terms like "simple", "suffering", "system layer", a
345.
▲
by
dventimi
3y ago
> No amount of joining can produce anything other than a table/relation. The n+1 problem is introduced when you try to build those types of structures from tables/relations. A trivial amount of lateral joins plus JSON aggrega
346.
▲
by
dventimi
3y ago
That sounds like a social problem, not a technical problem.
347.
▲
by
dventimi
3y ago
I have offered pagination over large tables, without database cursors or non-random keys, without offsets, while keeping performance in mind, with little effort.
348.
▲
by
dventimi
3y ago
The rest of you also don't need database cursors or non-random keys to have keyset pagination.
349.
▲
by
dventimi
3y ago
We may be talking about different things. I thought you were referring specifically to [database cursors]( https://en.wikipedia.org/wiki/Cursor_(databases) ) so that's what I was talking about. If you're talk
350.
▲
by
dventimi
3y ago
They also leak information.
351.
▲
by
dventimi
3y ago
I have never wanted to use database cursors and I predict that I never will.
352.
▲
by
dventimi
3y ago
After 742 pages and even after having written the paragraphs above, I still struggle with a simple answer to the question: “What is this book about?” The best I can come up with is that GEB equips you with mental models to contemplate phil
353.
▲
by
dventimi
3y ago
https://archive.ph/2024.01.29-165444/https://www.rollingston...
354.
▲
by
dventimi
3y ago
Here's my heretical views. What's yours? - the world is full of too many coders writing too much code - most business logic should be in the database - I blame the Apple II for the ORM quagmire - I also blame it for the gender dis
355.
▲
by
dventimi
3y ago
> By definition half the population will have opinions ahead of curve Nothing about that definition tells us anything about the variance. It could be imperceptibly small. > Unless OP is brash or arrogant when sharing ideas with the
356.
▲
by
dventimi
3y ago
> Is it just me, as I'm in the middle of a job search as everything is shifting where I feel like I've progressed past? It could be just you. Perhaps you're so far ahead of the curve that it will take years for the rest
357.
▲
by
dventimi
3y ago
Every single time https://archive.ph/2024.01.24-205525/https://www.nytimes.com...
358.
▲
by
dventimi
3y ago
I knew what that comment was referring to.
359.
▲
by
dventimi
3y ago
https://en.m.wikipedia.org/wiki/Formal_fallacy
360.
▲
by
dventimi
3y ago
It will help by forbidding drivers from turning right under ANY circumstances. That would be a change of conditions, and you can't say for certain that drivers won't change their behavior if it happens.
More ›