[Monetdb-developers] Single column select vs aggregation

Stefan de Konink stefan at konink.de
Thu Feb 18 19:05:47 CET 2010


Op 18-02-10 18:23, Stefan Manegold schreef:
> On Thu, Feb 18, 2010 at 05:46:31PM +0100, Stefan de Konink wrote:
>> Attached is a trace of a single column select operation, with a max,
>> avg and equality.
>>
>> The equality takes about 4 times more time than the avg operation.
>>
>>  From the plan I see that the operation is executed paralel, but I do
>> wonder why suddenly the uselect takes such a high amount of time.
>
> Which version of MonetDB?

CVS HEAD, 2 am.

> How configured / compiled?

--enable-assert --enable-debug

> How was the mserver5 started (which command line options were given)?

/opt/monetdb-head/bin/mserver5 --dbfarm=/home/skinkie/monetb 
--dbname=kvk --dbinit="include sphinx; include sql;" --set mapi_port=50001

> Any changes compared to the default monetdb5.conf?

No, not changed anything in there.

> Is the "kvk" column sorted?

No, it does include a partial sort (msb are sorted). A 32bit column 
(kvks) that is (or either should be...) ends up with between 170ms ~ 220ms.

> Could you run the select query in the MAL debugger
> (DEBUG select kvk from kvk where kvk = 412657690010;),
> single step through it,
> set the debug mask to 2097152
> (debug 2097152)
> just before the algebra.uselect() is executed,
> and report the output on the server console after the algebra.uselect() has
> been executed?

Do you mean this?

mdb>#    _44 := 
algebra.uselect(_40=<tmp_5710>:bat[:oid,:lng][1196532],A0=412657690010:lng);
mdb>
#BAT_select_(b=tmp_5710): sampling: tmp1 = BATslice(b=tmp_5710, 
_lo=598266, _hi=598371);
#BAT_select_(b=tmp_5710): sampling: tmp2 = BAT_select_(tmp1=tmp_5704, 
tl, th, tail);
#BAT_select_(b=tmp_5704): BAT_scanselect(b=tmp_5704, bn=tmp_5703, tl, 
th, equi=1, nequi=0, lval=1, hval=1, nocheck=1);
#seqscan_eq_lng_void_tloc_oid_vid_nocheck_noinc[if ( simple_EQ(tl 
,v,lng)                      ),v,oid_ctr,oid_ctr++;](b=tmp_5704, 
bn=tmp_5703, tl, th, oid_ctr=598266, str_idx=0);
#BAT_select_(b=tmp_5704): tmp_5703: hkey=1, tkey=0, 
hsorted=139659451564097, tsorted=0.
#BAT_select_(b=tmp_5710): BAT_hashselect(b=tmp_5710, bn=tmp_5703, tl); 
(building hash-table on the fly)
#BAThash: create hash(1196532);
#BAT_select_(b=tmp_5710): tmp_5703: hkey=1, tkey=0, 
hsorted=139659451564032, tsorted=139659451564032.


Stefan




More information about the developers-list mailing list