|
I have a stored procedure butt() that takes an _id and returns an integer, I have a query that uses it to get the top 10 buttest ids. Like this:code:
|
# ¿ Feb 7, 2017 19:24 |
|
|
# ¿ May 21, 2024 07:30 |
|
Vargatron posted:Wouldn't adding additional conditions or operators slow down performance worse than having a less restrictive filter? Not really in this case because butt is way more expensive than filtering. I just thought of a way to do it: code:
Symbolic Butt fucked around with this message at 23:00 on Feb 7, 2017 |
# ¿ Feb 7, 2017 21:05 |
|
The way I understand it is that LIKE is part of the SQL standard which implements a less expressive subset of regex. ~ is a postgres thing where they implemented full posix extended regex. I heard LIKE is supposed to be more efficient than ~ but I I'm not sure if this is relevant in most cases.
|
# ¿ Apr 23, 2017 04:06 |
|
loving incredible. Thanks for posting this Nth Doctor!
|
# ¿ Jun 6, 2017 15:05 |
|
I'm seconding SQL Antipatterns, it surprisingly became one of my favorite programming books ever, I keep going back to it.
|
# ¿ Mar 3, 2024 23:50 |