Ask

enabling rls took a 40ms select to 6.2s on a 2.1m row table

Related habit worth building: keep the filter in your query too. RLS is a backstop, not a query plan. select * from documents with a policy is asking the database to look at every row and then throw most away; select * from documents where user_id = $1 with the same policy asks it to look at twelve. Same result, wildly different work, and if the policy is ever wrong you still return the right rows.

24 · in/rls-and-policies ·

middleware runs twice per navigation and my rate limiter 429s real users

Middleware runs far more often than people picture. Prefetches, RSC payload requests, and anything else your matcher happens to catch. I have seen a matcher of /:path* with a lazy negative lookahead pull in every image request on the page, at which point your "10 per minute" is 10 per screenful.

Log req.url for a day before you trust any assumption about how often it fires.

28 · in/app-router ·

Three months of speaking practice with a chatbot instead of a tutor - did anyone's real conversations get better?

I counted mine for six months: roughly ninety hours with a model and about twenty two with a tutor, and the tutor hours moved my speaking more per hour by a wide margin. What the model hours were good for was volume and having no fear - I turned up to lessons already used to opening my mouth, which meant we never spent time on nerves. The cost ratio makes the combination sensible rather than either alone.

97 · in/learning-languages ·

Ten days in Hawaii and I have three islands on the itinerary: talk me out of it or tell me it works

Each island change is not a one hour flight, it is most of a day: return the car, get to the airport with time for bag drop, the flight, then the queue at the rental counter on the other end and the drive to wherever you are staying. Two changes eats close to two of your ten days, plus two extra check-ins and two lots of unpacking. Cut Oahu, do Maui and the Big Island, and you get the volcano, the snorkelling and the doing-nothing days without ever setting an alarm for a flight.

226 · in/trip-planning ·

Rear derailleur skips only in the two smallest cogs when I push hard

Chain and cassette, and your checker is already telling you so. Just under 0.75 on an 11 speed is well past the point where the small cogs are gone - they have the fewest teeth sharing the load, so they wear first and they are the first place a stretched chain skips.

The test is to fit a new chain only. If it skips worse in the small cogs immediately, the cassette is worn too. If it is silent, you caught it in time. At 6000km on 11 speed it is nearly always both.

Indexing is not your problem. Cable and B tension issues cause hesitation across the whole range, not load dependent skipping in two cogs.

158 · in/bike-wrenching ·

FWD hatch on proper winters or AWD crossover on all seasons, which one gets up my street?

The compound is the part people skip. A winter tyre is not just a tread pattern, it is a rubber formulation that stays pliable when it is cold, and the usual crossover point quoted is around seven degrees celsius. Below that an all season is getting harder and less grippy every degree, regardless of how deep the tread looks. That is why winters feel better on a cold dry road with no snow at all, which surprises people who think of them as snow-only equipment.

141 · in/winter-driving ·

vercel or a $12 vps for an app router app at 300k requests a month

300k requests a month is 0.11 req/s average. That is nothing. Your decision is not about capacity, it is about which failure you would rather have: a surprise invoice or a surprise outage.

Before you move, go find the actual line items. In my experience the two that blow up small bills are image optimisation and middleware invocations, and both are fixable in place. I cut a bill by 70% by serving already-resized images from object storage and never touching the optimiser.

29 · in/app-router ·

Six months of sharing a bed and I have never slept worse: separate duvets or separate rooms?

If the partner snores, or gasps, or stops breathing for a beat, that's the thing to chase rather than the sleeping arrangement. Mine did and I spent two years treating it as a noise problem with earplugs.

He got assessed, it was sleep apnoea, and treating it changed his daytime energy more than it changed my nights. I'm not diagnosing anyone here - I just wish someone had told me earlier that loud snoring is worth mentioning to a GP rather than engineering around.

97 · in/better-sleep ·