Bug 2508 - SQL:rel_optimizer apply min/max only on source table in join
Summary: SQL:rel_optimizer apply min/max only on source table in join
Status: NEW
Alias: None
Product: SQL
Classification: Unclassified
Component: all (show other bugs)
Version: -- development
Hardware: x86 (i?86) Linux
: Lowest enhancement
Assignee: SQL devs
URL: http://sourceforge.net/support/tracke...
Keywords: NONEEDTOTEST
Depends on:
Blocks:
 
Reported: 2009-10-09 02:58 CEST by Stefan de Konink
Modified: 2016-04-11 11:45 CEST (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan de Konink 2009-10-09 02:58:31 CEST
=project (
=| group by (
=| | crossproduct (
=| | | table(sys.tralala) [ tralala.test as a.test, tralala.%TID% NOT NULL as a.%TID% ],
=| | | table(sys.tralala) [ tralala.%TID% NOT NULL ]
=| | )
=| ) [  ] [ max no nil (a.test) as L1 ]
=) [ L1 ]

=>

=project (
=| group by (
=| | table(sys.tralala) [ tralala.test as a.test, tralala.%TID% NOT NULL as a.%TID% ]
=| ) [  ] [ max no nil (a.test) as L1 ]
=) [ L1 ]


The general solution should push down the aggregates min/max down to the tables where they operate upon and purge the remaining tables.
Comment 1 Pseudo user for Sourceforge import 2010-05-04 09:32:09 CEST
This bug was previously known as tracker item 2875293 at http://sourceforge.net/support/tracker.php?aid=2875293

The original assignee of this bug does not have
   an account here. Reassigning to the default assignee
   for the component, bugs-common@monetdb.org.
   Previous assignee was nobody@users.sourceforge.net.

Comment 2 Holger 2012-11-27 11:07:45 CET
This is a very specific case that doesn't seem very important. This can be fixed by simply rewriting the query.
Comment 3 Ying Zhang cwiconfidential 2012-11-27 16:23:16 CET
No test needed for feature request