@mjovanovictech
Milan Jovanović
17 days
I wrote two almost identical SQL queries. One of them was 451x times faster. I was implementing cursor pagination. And I thought... Why don't I add an index to make my query faster? This is where things went terribly wrong. We have an "Index Scan" using the composite index.
7
71
550

Replies

@skblackwell
S. Blackwell
17 days
@mjovanovictech Bro. Why not I’m just use an ORM?! It solves all your problems. /sarcasm
0
0
8
@Restore_NJ
Restore New Jersey
3 days
🚨 ATTN. New Jersey: We can do SO much better than Mikie Sherrill. She voted against the child tax credit… She voted for tax hikes… She voted to give your money to illegals… Reject her on Nov. 4th.
24
55
153
@code_with_tee
Code With Tee
17 days
@mjovanovictech I believe the major difference is the OR is used. With the or, you are merging two data set.
2
0
7
@quicktricks_dev
quicktricks.dev
17 days
@mjovanovictech Great example that you need to test your queries even when you think that it makes perfect sense to add a new index.
0
0
4
@giofranc
Giovanni Franco
17 days
@mjovanovictech How can we do this test? Thx
0
0
0
@BeatBastel
BastelBeat
17 days
@mjovanovictech you can not compare Indexed table vs not indexed table if you change the query during test.
0
0
0
@almaximal
MaximAL
17 days
0
0
0
@mjovanovictech
Milan Jovanović
9 hours
Here's how you can handle FluentValidation exceptions, extract the erros, and turn them into a Problem Details response 👇
2
7
69
@AntonMartyniuk
Anton Martyniuk
15 hours
𝗜 𝗵𝗮𝘃𝗲 𝗱𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗱 𝗔𝗣𝗜𝘀 𝘁𝗵𝗮𝘁 𝘀𝗲𝗿𝘃𝗲 𝗺𝗶𝗹𝗹𝗶𝗼𝗻𝘀 𝗼𝗳 𝘁𝗿𝗮𝗻𝘀𝗮𝗰𝘁𝗶𝗼𝗻𝘀 𝗲𝗮𝗰𝗵 𝘆𝗲𝗮𝗿. Here's what I've learned about building APIs that scale effectively. Avoid these mistakes: ❌ Starting a project with Microservices and Kubernetes ❌
10
16
143
@tom_doerr
Tom Dörr
15 hours
A self-hosted emailing platform
4
57
541
@TuoyoS26091
Samuel Tuoyo
1 day
When the 3rd-party payment provider sends a ping to your webhook endpoint /api/payment/success, take the metadata and push it to a queue. If you are using Node.js, you can use BullMQ, and if you are using Python, you can use Celery. Both are job queue systems that integrate with
@mysticwillz
THE CODE SCIENTIST
1 day
You integrate with a 3rd-party payment provider. They send a webhook to /api/payment/success. But your server restarts during deployment. The request is lost. Payment went through but your app never knew. How can we fix/avoid this?
24
22
343