Live data from Hacker News

Learn to stop using shiny new things and love MySQL

engineering.pinterest.com

61–64 of 64 posts

Re: Learn to stop using shiny new things and love MySQL

#61
post #60

Earlier quoted context omitted.

I'd like to see your full setup for your claim about 10x slower, because I suspect you're doing something wrong.

Sure, here's the pastebin of the postgres one: http://pastebin.com/Phc8KnYU I thought I was doing something wrong, so I asked on SO: http://stackoverflow.com/questions/32755348/group-by-count-q... This is a very simple example, but I always run into major performance issues with Postgres. Some of them are my fault, from not knowing that array aggregation is a slow operation. MySQL advantages for me are that there is…

I'm going to ignore your baseless (and incorrect) assertion about "an inferior version" of UPSERT (MySQL's doesn't work properly except for the primary key). Your problem is that you are not doing an index only scan. The reason you are not doing an index only scan is, most likely, that the visibility bit is not set on the table. This is usually as a result of excessive writing to the table, but sometimes it is due to incorrectly tuned planner settings. Try setting your cpu_tuple_cost higher and/or cpu_index_tuple_cost lower. I have had to do this in the past to get index only scans to work. BTW, a quick way to force the issue is to SET enable_seq_scan TO off in psql.

I would add, you should really upgrade to 9.4, as there were some performance improvements to aggregates.

Re: Learn to stop using shiny new things and love MySQL

#62

OMG, that article had some serious common sense.

Dam, always getting down voting for stating an opinion. What's up with that. (By the way, I actually read the article.)

Probably because your comment didn't add anything to the discussion. There's somewhat of a culture here of downvoting "Me too" or "+1" type content-free comments, and even jokey one-liners that don't progress the discussion.

My respectful suggestion is that when you want to comment, try to say something that uses your own experience or opinion to add something to the discussion, rather than to mirror or agree with some point in the article or in a comment. I'm far more likely to upvote something that makes me realize something I hadn't already thought of.

Re: Learn to stop using shiny new things and love MySQL

#63
post #49

Earlier quoted context omitted.

Dam, always getting down voting for stating an opinion. What's up with that. (By the way, I actually read the article.)

The correct response is not to give a damn about something so arbitrary.

You are absolutely correct.

I blame it on a temporary lapse of reason.

(I usually don't run with the herd, so this shouldn't be a surprise to me...)

Re: Learn to stop using shiny new things and love MySQL

#64
post #60

Earlier quoted context omitted.

Sure, here's the pastebin of the postgres one: http://pastebin.com/Phc8KnYU I thought I was doing something wrong, so I asked on SO: http://stackoverflow.com/questions/32755348/group-by-count-q... This is a very simple example, but I always run into major performance issues with Postgres. Some of them are my fault, from not knowing that array aggregation is a slow operation. MySQL advantages for me are that there is…

I'm going to ignore your baseless (and incorrect) assertion about "an inferior version" of UPSERT (MySQL's doesn't work properly except for the primary key). Your problem is that you are not doing an index only scan. The reason you are not doing an index only scan is, most likely, that the visibility bit is not set on the table. This is usually as a result of excessive writing to the table, but sometimes it is due to…

Thanks for the tips.

I am not sure in which cases the MySQL one doesn't work correctly. ON DUPLICATE KEY UPDATE checks every unique fields in table, not just PRIMARY key.

Also, I'll try these suggestions, but you can see that it can be frustrating that simple queries don't work quickly or randomly work really slowly and you have to find some configuration settings to hand tune.

Post reply on HN