Ask HN: Going from Redis to MySQL. Good idea?
21–30 of 52 posts
Re: Ask HN: Going from Redis to MySQL. Good idea?
#22There's no easy answer i don't think. it depends. If you decide it makes sense to switch to an rdbms, you should probably consider postgres rather than MySQL.
Re: Ask HN: Going from Redis to MySQL. Good idea?
#23>moving from redis Yes. It is a very poor choice for your needs. >to mysql No. It is a very poor choice in general. >What other databases Postgresql obviously. I'm honestly shocked that people are still considering mysql in 2014.
Re: Ask HN: Going from Redis to MySQL. Good idea?
#24I think redis should have current data only which may be needed to process or crunch daily sales or so etc.
Re: Ask HN: Going from Redis to MySQL. Good idea?
#25TL;DR: you don't have to use one or another, use both! Your use case, running a restaurant is certainly a mixed use case. You'll certainly want to query the latest orders if this is going from the waiter to the kitchen. But yesterday's orders aren't that much important. As others have mentioned, this data is exactly the kind of data you would store in a relational database. Just be sure to not query for the last 10 o…
The trade-off here is that every index you add makes insertion a little bit slower, so you don't normally want to just add an index for every query.
Re: Ask HN: Going from Redis to MySQL. Good idea?
#26Re: Ask HN: Going from Redis to MySQL. Good idea?
#27I'll try and answer your 3 questions. 1. As with most things it depends, but I'll make the mistake of assuming you don't need all of this data in memory and you won't be iterating over the entire set of data on a regular ( 2. Again "It depends". Postgresql is the most popular alternative to MySQL and I'd say at this point is more in vogue with the developer community. It's supported on AWS RDS and Heroku has a great…
The OP has 40GB of data, so to query that even once per minute with Redis would effectively max out 10Gb ethernet.
Of course, the real win is that something that would be a table scan in Redis could be a indexed query in SQL. Doing a table scan over 40GB of data is always going to be painful.
Re: Ask HN: Going from Redis to MySQL. Good idea?
#28I'll try and answer your 3 questions. 1. As with most things it depends, but I'll make the mistake of assuming you don't need all of this data in memory and you won't be iterating over the entire set of data on a regular ( 2. Again "It depends". Postgresql is the most popular alternative to MySQL and I'd say at this point is more in vogue with the developer community. It's supported on AWS RDS and Heroku has a great…
If you're iterating over the entire dataset regularly though, you should _definitely_ use a relational database over Redis, because a relational database lets you push processing onto the server. With redis you'll have to fetch every row over the network; with a SQL database you'll typically only retrieve the final summary data. The OP has 40GB of data, so to query that even once per minute with Redis would effective…
Redis supports filter features native, so it basically works as every remote service.
Re: Ask HN: Going from Redis to MySQL. Good idea?
#29Earlier quoted context omitted.
If you're iterating over the entire dataset regularly though, you should _definitely_ use a relational database over Redis, because a relational database lets you push processing onto the server. With redis you'll have to fetch every row over the network; with a SQL database you'll typically only retrieve the final summary data. The OP has 40GB of data, so to query that even once per minute with Redis would effective…
>With redis you'll have to fetch every row over the network; >with a SQL database you'll typically only retrieve the final >summary data. Redis supports filter features native, so it basically works as every remote service.