MonetDB: default - Report correct 100% sample size

Niels Nes Niels.Nes at cwi.nl
Sat Aug 17 00:00:45 CEST 2013


On Fri, Aug 16, 2013 at 09:56:49PM +0200, Martin Kersten wrote:
> Changeset: afa6da5dd7bd for MonetDB
> URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=afa6da5dd7bd
> Modified Files:
> 	sql/backends/monet5/sql_statistics.c
> Branch: default
> Log Message:
> 
> Report correct 100% sample size
> 
> 
> diffs (12 lines):
> 
> diff --git a/sql/backends/monet5/sql_statistics.c b/sql/backends/monet5/sql_statistics.c
> --- a/sql/backends/monet5/sql_statistics.c
> +++ b/sql/backends/monet5/sql_statistics.c
> @@ -169,7 +169,7 @@ sql_analyze(Client cntxt, MalBlkPtr mb, 
>  				}
>  				snprintf(query,8192,
>  					"insert into sys.statistics values('%s','%s','%s','%s',%d,now(),"LLFMT","LLFMT","LLFMT","LLFMT",'%s','%s',%s);",
> -						b->name, bt->name, bc->name, c->type.type->sqlname,width, samplesize, sz, uniq, nils, minval,maxval, sorted?"true":"false");
> +						b->name, bt->name, bc->name, c->type.type->sqlname,width, (samplesize?samplesize:sz), sz, uniq, nils, minval,maxval, sorted?"true":"false");
>  #ifdef DEBUG_SQL_STATISTICS
>  				mnstr_printf(cntxt->fdout,"%s\n",dquery);
>  				mnstr_printf(cntxt->fdout,"%s\n",query);
> _______________________________________________
> checkin-list mailing list
> checkin-list at monetdb.org
> http://mail.monetdb.org/mailman/listinfo/checkin-list

Martin

Volgens mij wil je de volgende verzameling van analyze calls:

analyze([opt_sample_size]) -- full db
analyze(schema, [opt_sample_size]) -- full schema
analyze(schema, table, [opt_sample_size]) -- full table
analyze(schema, table, column, [opt_sample_size]) -- full table

ie dus niet analyze(table, ...) voor die is het onduidelijk welk schema.

Niels

-- 
Niels Nes, Centrum Wiskunde & Informatica (CWI)
Science Park 123, 1098 XG Amsterdam, The Netherlands
room L3.14,  phone ++31 20 592-4098 	sip:4098 at sip.cwi.nl
url: http://www.cwi.nl/~niels   e-mail: Niels.Nes at cwi.nl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20130817/ba248419/attachment.sig>


More information about the developers-list mailing list