Changeset: f14ce2b0f47c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f14ce2b0f47c
Modified Files:
        gdk/gdk_select.c
Branch: Oct2012
Log Message:

make sure we go for hash select in case of very high selectivity (ie sample
returns 0 selected)


diffs (13 lines):

diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -932,6 +932,9 @@ BATsubselect(BAT *b, BAT *s, const void 
                                /* linear extrapolation plus 10% margin */
                                estimate = (BUN) ((dbl) slct_cnt / (dbl) 
smpl_cnt 
                                                  * (dbl) BATcount(b) * 1.1);
+                       } else if (smpl_cnt > 0 && slct_cnt == 0) {
+                               /* estimate low enough to trigger hash select */
+                               estimate = (BATcount(b)/100) -1;
                        }
                }
                hash = hash && estimate < BATcount(b) / 100;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to