[GENERAL] OR vs UNION vs UNION ALL

2015-09-23 Thread Etienne Champetier
Hi, I've reworked a bit an application to make 1 query (with many OR) instead of thousands (2900 in this bench), but was a bit disappointed with the perf. Here follow a quick bench and 2 questions at the end: Here is my table CREATE TABLE properties ( item_id text NOT NULL, calendar_id uuid

Re: [GENERAL] OR vs UNION vs UNION ALL

2015-09-23 Thread Merlin Moncure
On Wed, Sep 23, 2015 at 8:38 AM, Etienne Champetier wrote: > Two questions: > 1) Is it normal to have such a big difference between OR and UNION and > should i always prefer UNION when possible? yes, it's unfortunate but true. I consider automatic transformation of