Re: Proposal for Merge Join for Non '=' Operators
| От | Hadi Moshayedi |
|---|---|
| Тема | Re: Proposal for Merge Join for Non '=' Operators |
| Дата | |
| Msg-id | CAK=1=Wod_=tNGWSrZwbgvOYZLDK3ZWxG9nqmSQQz-y8470zY7w@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Proposal for Merge Join for Non '=' Operators (Dilip kumar <dilip.kumar@huawei.com>) |
| Ответы |
Re: Proposal for Merge Join for Non '=' Operators
|
| Список | pgsql-hackers |
Hello Dilip,
Query: select count(*) from t1,t2 where t1.b<t2.b and t1.b > 12000;
Test Result:
Nest Loop Join with Index Scan : 1653.506 ms
Sort Merge Join for (seq scan) : 610.257ms
This looks like a great improvement. Repeating Nicolas's question, do you have a real-world example of such joins?
In my experience, I see more queries like "self-join table A and table B where A.time BETWEEN B.time - '1 week' and B.time", similar to what Nicolas and Tom mentioned. As an example, "count users who placed an order in the week following their registration".
Can you send a patch so we can also try it?
Thanks,
-- Hadi
В списке pgsql-hackers по дате отправления: