pgtestdb looks great. Looks like it leverages Postgres template DBs. We use MySQL more often than Postgres; I may take a stab at creating something similar for MySQL. Nicely done!
I haven't really been able to find a way that works well on MySQL (well, MariaDB). Transactions are too unreliable and magical in MariaDB, Memory databases/tables have all sorts of caveats and limitations, and there isn't really anything like PostgreSQL's schemas or templates.
The best I could come up with was to run MariaDB server with libeatmydata, which I believe was pretty much intended for this. It's not very "works on any MariaDB server"-generic, but it's good enough.
dang. Only thing I've found so far is a `mysqldump --no-data` and then a restore from dump. Not fast at all. Maybe you could pre-provision a few thousand DBs this way in parallel and write a service to hand out DB handles...
Using tmpfs for MySQL/MariaDB's data directory helps tremendously. If you're using Docker natively on Linux, use `docker run --tmpfs /var/lib/mysql ...` and that'll do the trick. Only downside is each container restart is slightly slower due to having to re-init the database instance from scratch.
Tuning the database server settings can help a lot too. You can add overrides to the very end of your `docker run` command-line, so that they get sent as command-line args to the database server. For example, use --skip-performance-schema to avoid the overhead of performance_schema if you don't need it in your test/CI environment.
For MySQL 8 in particular, I've found a few additional options tend to help: --skip-log-bin --skip-innodb-adaptive-hash-index --skip-innodb-log-writer-threads
(Those don't help on MariaDB, since it already defaults to disabling the binary log and adaptive hash index; and it doesn't have separate log writer threads.)
A lot of other options may be workload-specific. My product Skeema [1] can optionally use ephemeral containerized databases [2] for testing DDL and linting database objects, so its workload is very DDL-heavy, which means the settings can be tuned pretty differently than a typical DML-based workload.
Disclaimer - I’m not a doctor. Simply speaking, the vessel in my brain got too close to the nerve, causing me to become almost 100% deaf on one side, the whole thing took 1 day, probably as a result of a stressful day, combined with the overall setup of my brain. The lack of signals coming from the ear is now causing my brain to “hear” the sound based on what is happening in a vein, some false data coming (and also not coming) to the brain, that’s tinnitus. It’s something between the sound of an old tv and the sound they play in movies when a hero gets too close to an explosion.
I had the MRI scan made, and surprisingly the doctor who did it also suffers from that thing. We are both in 30-40 years old range. This helped me to accept it, not going to lie. Like being able to ask somebody who knows what tinnitus is.
that's pretty fundamentally different, no? One requires you to build a distributed system with >1 components leveraging GCP tasks APIs. The second is just a library do some book keeping inside your main datastore.
Column is the first and only nationally chartered bank built from the ground up. We build APIs to create bank accounts, send and receive money (wire/ACH/check/SWIFT), administer loans, etc. In contrast to other software providers in the space who interface with banks, we are the bank, building and owning the full payments stack in-house.
Think of us as the bottom layer of the financial infrastructure stack, offering atomic and flexible building blocks for developing financial products in an efficient and compliant way.
We are a small, tight knit team of engineers supporting complex customers and moving billions of dollars.
Looking for motivated infrastructure/backend engineers who seek a high degree of ownership. Apply at the link above, or email me directly at mitch@column.com
it's so fascinating when health/fitness discussions crop up on HN. absolutely not gatekeeping, but just observing that compared to the technical topics, there is sooo much more disagreement while at the same time, more conviction. Seems like people really believe they know what they are talking about, whereas when it comes to the technical discussions, the tone seems more curious/introspective vs. dogmatic.
I totally agree! I'm an MD with a BS in human nutrition and a deep personal interest in diet and fitness (which is what eventually prompted me to pursue medical school). One of my most common refrains is the paradox between the tremendous proportion of the human population that consumes food, the tremendous proportion for whom diet strongly impacts health, in contrast to the tragically small body of truly rigorous, adequately powered, properly controlled, sufficiently longitudinal, non-surrogate-outcome'd research on the topic.
It's also surprising how many on HN seem more willing to accept my half-baked self-taught opinions on tech topics than they are my opinions on health. ¯\_(ツ)_/¯
Isn't that just a manifestation of the old saying that "the more I learn, the more I realize how much I don't know"? On health/fitness forums, I'm sure the health/fitness discussions are more nuanced and the technical discussions are clownish.
Noticed the same the other day on an audit discussion. Got downvotes. Fine whatever. Thing is I’ve got about a decade experience in it…presumably a bit more than the average hn’er
Makes me wonder what I’m commenting on with strong opinions despite being less than well informed
I’ve spent a lot of time around smart and eccentric people and around various diet and exercise “communities” and one thing I’ve noticed is that smart and eccentric people are so much more likely to subscribe to faddish, heterodox diets and exercise routines.
Tech attracts a lot of smart, eccentric people with anti-authoritarian, anti-mainstream bents. Bizarre ideas strongly held about health and nutrition emerge naturally among this group.
Makes you wonder what else they’re not really experts about, but that can also be a feature. A guy doesn’t know you can’t just put a supercomputer touchscreen in everyone’s pocket but he also doesn’t know carrots don’t cure cancer.