Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4669027yCould speed that up if you weren’t returning all the unnessasary data.
SELECT COUNT(id)
FROM programmers
WHERE attr = “no_gf”
GROUP BY attr;
I don’t need to know who they are.
@NoMad
They don’t get returned? -
C0D4669027yDepends on what the OP was intending the search to do
For single we could just use another field for relation status enum(single, partner, married, other)
And look at that instead
Unless the Op wants to know how many don’t have a GF, then this would also include Female and Male relationships as it stands. -
WhoCode12677yFor me this query means select every programmer with no girlfriend.
Why should this take 6 months ? -
Depending on the fb engine it would be faster to have a bool field of 'partner_status' rather than trying to do a string match
-
I literally do not know a single programmer who is single.
There are 23 devs at work, all married or with girlfriend, one gay and 3 females with boyfriend. And they're not at the bottom of the gene pool either, at company parties they all seem smart and good looking.
Meanwhile, many of the guys from sales are single, or have one-week relationships.
Devs are the new alphas 🤘 -
There was a wonderful essay at https://qntm.org/gay that outlined modern relationship issues with databases. But the bloke took it down for a rewrite so I will leave it to you to find an archived version.
-
zshh38487yWell how long would the query take if you used “attr=‘partner’”? That statement on its own doesn’t hold much value.
SELECT * FROM programmers WHERE attr='no_gf'
Query took 6 months.
rant