Does MySQL normally use way more memory than Postgres?
Hey everyone,
I am starting up a new project and just commissioned a MySQL instance on railway. I have a PSQL instance for another tiny app that's running around 40mb of memory. This new MySQL instance with literally no data is running 13x higher in memory at 500mb or so. I have basically only used Postgres the last few years and am not super familiar with MySQL so maybe this is normal, but does anyone know if that's the case or not? I could also try deploying a MySQL instance from just a Dockerfile or something. Let me know what you guys think.
Here is the service ID: ec461b76-5080-4433-99c1-7f9d61e64f49
19 Replies
Project ID:
ec461b76-5080-4433-99c1-7f9d61e64f49
Solution
perfectly normal
thats mysql for you
Hahah okay thanks for the quick reply, looks like I will just use postgres again for this project. Thanks !
mariadb is also an option, doesnt use as much as mysql but also doesnt use as little as postgres
Yep I actually commisioned a MariaDB first last night thru the templates but I wasn't able to access it for some reason. Maybe I will try that again tonight, thanks!
yeah ive been thinking about that template lately
it was made before tcp proxying came out
so it doesnt come with a way to access the db publicly
it also deploys from a github repo, so you end up with a random github repo in your repos every time you deploy that database
super not ideal
Yeah 100%, how would you reccomend I commision that to access it publically? Can I just upload a dockerfile with the configs for it or even from docker hub?
youd wanna deploy the mariadb docker image with a volume and tcp proxying
but ill be honest, its super easy to mess up if youve never done something like that before
im very likely going to get a chat going with that templates creator and help them get their template up to snuff
Yeah I have used volumes before but TCP proxy is kinda scary to me, I might mess around. For reference that was using about 120mb memory for the db instance and 20mb for his gui he attatched to it
I could also use a local version and then switch out the env var to use the internal routing when hosted
you could do something like that yeah
Am I able to do the TCP proxying stuff just from like a docker image and settings on railway? I would've assumed that was something that would have to happen on the railway backend infra
yes you could
i would publish a template in 5 minutes for mariadb for you, but i dont wanna publish a duplicate template, i have just asked the creator of the current mariadb template
Okay awesome. That would be a good middle ground if he can get that set up I’d definitely use it. I will probably start development with a local instance and use the old template for now but definitely looking forward if when he sets up the proxying. Thanks again!
here you are https://railway.app/template/Onvy0F
That is awesome dude! Thanks so much I am deploying right now and I'll give it a go, thanks
my plan is to show this to the original template creator so they can mirror their template from mine, i will then unpublish mine (this wont effect your deployment at all)
Okay cool, In some ways I prefer this one because I don't need a github repo and his came with an extra GUI I would probably just get rid of anyway. Reagrdless this works well now, I'm all connected, about 185mb which is a lot more reasonable
yeah I think my template is a little more optimal too, it's how railway themselves would do such a template
but of course if you have any troubles with it, I'll be around