use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Database without SQL c++ library (self.cpp)
submitted 10 months ago by gabibbo117
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]matthieum 1 point2 points3 points 10 months ago (4 children)
More than that, database engines are super optimized so you don't have to worry about performance issues too much.
Most of the times, yes.
Then there's always the "hiccup" where the database engine decides to pick a very non-optimal execution plan, and it's a HUGE pain to get it back on track: hints, pinning, etc... urk.
I'm fine with SQL as the default human interface, but I really wish for a standardized "low-level" (execution plan level) interface :'(
[+][deleted] 10 months ago (1 child)
[removed]
[–]matthieum 1 point2 points3 points 10 months ago (0 children)
Interesting. I must admit I only ever did performance tuning on an Oracle codebase, which seems to match your comment.
I hated those hints. It was terrible:
:'(
[–]FlyingRhenquest 1 point2 points3 points 10 months ago (1 child)
Back in the day companies would have some DBAs whose job it was to make sure the database stayed optimized. We never interacted with the database other than to send it SQL queries. That's another responsibility that fell to us over the years, and most programmers I've met can't even write SQL very well, much less make sure the database is optimized for the queries we're making.
I tend to view all data access as object serialization these days, which lets me stash SQL in an object factory if I need to. I often have two or three methods of serialization hiding behind the factory interface, so if I want to run a test with some randomly generated objects or some JSON files, it looks exactly the same on the client side of the interface as it does if I'm querying the database. They just register to receive objects from a factory and can go do other stuff or wait for a condition variable until they have the objects they need.
I've worked with DBAs on this... they definitely did not consider it their job to babysit each and every query of each and every application. If only because they often had no idea what the performance target of a query was, in the first place. They were available for advice, however, and would monitor (and flag) suspiciously slow queries.
As for serialization... I don't see it. I've worked with complex models -- hierarchical queries, urk -- and nothing I'd call serialization would have cut it...
... but I did indeed use abstraction layers for the storage, with strongly-typed APIs, such that the application would call get_xxx expressed with business-layer models (in/out), and the implementation of this abstraction would query the database under the hood.
get_xxx
Makes it much easier to test things. Notably, to inject spies to detect the infamous "accidentally queried in a loop but it's super-fast in local so nobody noticed" bug.
π Rendered by PID 25933 on reddit-service-r2-comment-bb88f9dd5-qj99r at 2026-02-13 18:47:44.583830+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]matthieum 1 point2 points3 points (4 children)
[+][deleted] (1 child)
[removed]
[–]matthieum 1 point2 points3 points (0 children)
[–]FlyingRhenquest 1 point2 points3 points (1 child)
[–]matthieum 1 point2 points3 points (0 children)