4,354 karma · joined August 11, 2014
Would you rather the company went under after it ran out of money and had to fire everyone instead? Not to mention a quarter of the company was laid off the year before the acquisition.
Every major database uses nested loop, hash, or sort-merge joins. If the data is small enough to fetch in a second query, I don't see any scenario where it would make a query spill to disk when it otherwise wouldn't have (except those pesky OR's).
Most JOIN issues can be resolved by composing using sub-queries/CTE's to defer a join to a smaller intermediary result, and the only time this generally can't be done is if you need a predicate on the joined table.
> you've asked the database engine to sort things
I've only found this to be true when there's an OR condition where the single query ends up doing a bitmap against every row, in which case a UNION will be faster since it's just appending two already-index-ordered streams.
> Same with UNION vs IN
A union is almost always going to be worse - most query planners cannot optimize across queries in a UNION, so each query is going to have separate ops vs. a single op with the IN. The only case I've seen this be true is for multi-column predicates with an OR clause against a composite index. I just tested the former in both Postgres and MSSQL and the UNION query cost was 2x the IN clause.
> maybe it decides to do an index scan which takes longer
This has not been my experience unless the table statistics are bad.
I've sold close to $1B on Shopify in the last decade and have never had a problem with them.
Excepts it comes with a terrible experience that's not sustainable for any serious day-to-day work that doesn't involve constant coffee breaks to wait for some tokens to get generated. No thanks. They don't have to live up to the hype to be useful tools, and for something that costs me annually what I make in a day I'm perfectly happy with the value I'm getting of out of it all (even if someone else is subsidizing it... for now).
> going hundreds of billions of dollars into debt
This forum exists exactly because of these companies.
Every tech you mentioned is absolutely governed by multibillion dollar companies. Something like 75-85% of OSS code is contributed by employees doing their day job. Most Linux and Postgres contributions come from those same employees. HTTP and TCP/IP are managed by standard bodies and industry working groups that, you guessed it, are governed by multibillion dollar companies. Red Hat and IBM are responsible for 40-60% of contributions to Qemu.
Something that's always stuck with me is a bit from the book "Don't Make Me Think" about cost vs. value in attention and complexity, that when you add a feature used by only a small percentage of users you're "taxing" 100% of users for the benefit of a few. That you should optimize for the common path and not edge cases. Over two decades later I still find this an exceedingly difficult challenge to juggle that doesn't just mean hiding advanced features behind extra menus.