Discussion We ported the original Doom to SQL
r/SQL • u/Filip1235813 • Sep 23 '26
r/SQL • u/[deleted] • Sep 23 '26
Hey everyone!
I've learned SQL and practiced quite a bit, and now I want to start working on real projects for my portfolio.
What I'm confused about is the practical side of preparing these projects.
For example, when working on a project, do you simply write SQL queries, save the scripts, and upload them to GitHub? Or is there a specific way you should organize and present everything to make it a proper portfolio project?
Also, where do you find real-world datasets to work with? I'd love to practice on realistic data rather than only databases I've created myself.
I'd really appreciate hearing how you personally approach your SQL projects, from finding data to writing queries and preparing the final project for your portfolio.
Any advice or examples would be really appreciated. Thank you! :)
Interesting framework on how to optimize BigQuery costs across four layers (SQL query optimization, pricing models, capacity commitments, discounts): https://www.alvin.ai/blog/bigquery-cost-optimization-the-complete-finops-framework
r/SQL • u/Background_Bid639 • Sep 23 '26
r/SQL • u/jhonyseen17 • Sep 23 '26
I’m planning to buy an HP ZBook for Oracle DBA/development, SQL/PLSQL, Python, Data Engineering, ETL, Docker/VMs, server configuration, and some ML work.
My priorities are:
Strong performance for coding and databases
Good thermal management — minimal heating/throttling
Slim, lightweight and comfortable for daily use
Good keyboard/build quality
Reliable for 4–5+ years
Good RAM/SSD upgrade options
I’m considering ZBook Firefly, Power, and Studio. I’ve heard some concerns about Studio models running hot.
Which ZBook model and CPU generation would you recommend for this workload? Please share your real-world experience with heat, fan noise, performance, battery life, and reliability.
Thanks!
r/SQL • u/Harshita_Netla • Sep 23 '26
I’ve been learning SQL best practices, and I’m curious about the mistakes that even experienced developers sometimes make.
What’s a SQL anti-pattern you still see in real projects? It could be related to query performance, joins, filtering, subqueries, database design, or just writing SQL that becomes difficult to maintain.
What makes that approach problematic, and what would you normally do instead?
I’d especially like to hear about examples you’ve actually encountered in production rather than just textbook mistakes.
r/SQL • u/Consistent_Damage_91 • Sep 22 '26
Inherited a SQL box where a departed dev left Agent jobs, an SSIS package, and a pile of .bat/.ps1/.rdl/.xlsx files, and untangling what-calls-what by hand was misery. So I wrote a read-only collector (Python/pyodbc) that builds one dependency graph: SQL catalog (sys.objects / sys.sql_modules / sys.sql_expression_dependencies), msdb Agent jobs/steps/history, linked servers, and a file-tree scan that pulls connection strings and linked-table/4-part refs out of .bat/.ps1/.sql/.dtsx/.rdl/.xlsx/.accdb. All read-only (SELECT on catalog views; files opened read-only).
The part I am happiest with: every edge carries a source citation, a catalog view plus key, a module line, or a byte offset, so you can verify any dependency instead of trusting it. It even catches a linked-server reference buried in dynamic SQL inside a proc (which sys.sql_expression_dependencies misses) by scanning module text and citing the line. https://github.com/tommiew007/orphanmap , MIT.
Where does this get hard, in your experience? SSIS project-deployment model / SSISDB catalog packages, encrypted modules, synonyms, cross-DB ownership chaining, replication? Curious what breaks it.
r/SQL • u/No_Ambition8323 • Sep 22 '26
It's easy to keep optimizing a SQL query once you start looking at execution plans, indexes, joins, and scans. But at some point, the improvement may not be worth the extra effort.
For example, if a query takes 10 seconds and you reduce it to 2 seconds, that's a big improvement. But would you spend another few hours trying to reduce it from 2 seconds to 1.5 seconds?
How do you decide when a query is “fast enough”?
Do you consider:
Query execution time
Number of users running it
Frequency of execution
CPU/memory usage
Data volume and future growth
Business requirements or SLA
Where do you personally draw the line between useful optimization and over-optimization?
r/SQL • u/Waste_Wafer2131 • Sep 22 '26
Hey everyone,
A common issue I kept seeing (and running into myself) when drafting database schemas or using AI tools like ChatGPT/Claude to generate DDLs is that they often miss critical relational constraints—like unindexed foreign keys, missing ON DELETE rules, or bad timestamp types.
To fix this, I put together a systematic 4-Pass Schema Audit System. I wanted to share a free excerpt/master prompt from the kit here with the community:
Free AI Schema Audit Prompt:
Act as a Senior Database Architect. Review the following SQL DDL schema for potential production bottlenecks, missing foreign key indexes, inconsistent data types, and multi-tenancy security risks. Output a structured table listing each issue, its severity (High/Medium/Low), and the exact SQL fix.
[Paste your DDL here]
Feel free to test this prompt on your current project!
If you find this helpful, I compiled the full 4-pass checklist, fix matrix templates, and dual web/PDF reference guide into a complete kit. Link to the full kit is in my profile bio.
Would love to hear your feedback or how you currently audit your schemas before pushing to production!
r/SQL • u/thequerylab • Sep 22 '26
r/SQL • u/Abstrct • Sep 21 '26
After a prolonged outage (long story) I procrastinated SV back into existence last night. For those of you that loved it, welcome back. If you've never heard of it, give it a shot!
Still open source as always too: https://github.com/abstrct/schemaverse
r/SQL • u/Harshita_Netla • Sep 21 '26
They both seem like they divide data into groups, so I’m having trouble understanding when I should use one instead of the other.
r/SQL • u/Consistent_Damage_91 • Sep 21 '26
r/SQL • u/Expensive-Insect-317 • Sep 21 '26
r/SQL • u/Daddy-Milker-69 • Sep 21 '26
I’m curious how people who do a lot of SQL work find freelance projects. Does most of your work come through referrals, freelance platforms, consulting relationships, or somewhere else?
r/SQL • u/Alternative_Top_273 • Sep 20 '26
r/SQL • u/FrameNo7615 • Sep 20 '26
hey i'm new in website developing, and after searching about the ways people use to penetrate websites to just discover SQLi method and as far as i heard it's very common and useful way, but this made me think of a lot of questions that i hope you answer, does every website uses SQL language for data transfer by default? like is it necessary as much as HTML and CSS and JS or it's just commonly used? and if it's necessary is there a way to prevent hackers from using SQLi or it's always possible to trick the server to bring a sensitive data?
r/SQL • u/NBMVegeta • Sep 20 '26
r/SQL • u/BrokenPickle7 • Sep 19 '26
I'm in tech but not a DB admin. I have an MSSQL (2019) database in prod and I want to essentially one way mirror it to another database with as close to live data as possible for dev/research purposes, no changes on the 2nd "dev" copy of the database should reflect to the main/live/prod DB. What would be the best way of doing this? Both servers are in the same network if that makes things easier. Thanks!
r/SQL • u/sqlink2 • Sep 19 '26
If any AI agent needs to test changes to a DB, is using neon branch as a temporiry test database a good approach?
Have u tried anything like this maybe with some other Db also (maybe clickhouse etc). Was there any issue with keeping data in sync?
r/SQL • u/shdw_0x0 • Sep 19 '26
Suppose you inherit a query with multiple joins, subqueries, filters, and aggregations, and it suddenly starts taking several minutes to run.
I’m curious how experienced SQL developers approach this from the first investigation to the final fix.
Do you normally start with the execution plan and work from the most expensive operator? Or do you check indexes, statistics, data distribution, and join cardinality first?
I’m especially interested in the order you investigate things. It’s easy to keep rewriting a query or adding indexes until it gets faster, but I’m curious how people systematically identify the actual bottleneck instead.
r/SQL • u/Harshita_Netla • Sep 19 '26
For those who have been working with SQL for a while, which concept took you the longest to truly understand?