r/SQL • u/badboyzpwns • May 20 '26
PostgreSQL What are common SQL red flags?
Hello! interview prepping, here wondering what are some common red flags for wrioting SQL?
Like
LIKE failing to index, not having trasnactions, usign SELECT * instead of specific collums, etc 😃
48
Upvotes
View all comments
Show parent comment
2
u/GunnerMcGrath May 22 '26
25 years here, never have had a situation where a cursor was even remotely the right choice. Have refactored many cursors others have written (including one that had been running for 24 hours when I was asked to help and I turned it into a single update statement that ran in a split second).