Following the manual https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/statistics I am trying to reproduce this, but it fails with a type conversion error: sql>call sys.analyze('sys', 'types'); conversion of string 'sys' to type int failed. sql>SELECT * FROM sys.statistics; +-----------+------+-------+-------+--------+-------+--------+------+--------+--------+ | column_id | type | width | stamp | sample | count | unique | nils | minval | maxval |> +===========+======+=======+=======+========+=======+========+======+========+========+ +-----------+------+-------+-------+--------+-------+--------+------+--------+--------+ 0 tuples (3.013ms) !1 column dropped! Tried it with different schema/table/column names. Both with system and user-generated tables. Always the same error. Running 11.21.5 here. Thanks.
On Fri, Sep 18, 2015 at 07:14:45PM +0200, Robert Koch wrote:
Following the manual
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/statistics
I am trying to reproduce this, but it fails with a type conversion error:
sql>call sys.analyze('sys', 'types'); conversion of string 'sys' to type int failed. sql>SELECT * FROM sys.statistics; +-----------+------+-------+-------+--------+-------+--------+------+--------+--------+ | column_id | type | width | stamp | sample | count | unique | nils | minval | maxval |> +===========+======+=======+=======+========+=======+========+======+========+========+ +-----------+------+-------+-------+--------+-------+--------+------+--------+--------+ 0 tuples (3.013ms) !1 column dropped!
Tried it with different schema/table/column names. Both with system and user-generated tables. Always the same error.
Running 11.21.5 here. just call analyze sys.types;
Niels
Thanks. _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- Niels Nes, Manager ITF, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room L3.14, phone ++31 20 592-4098 sip:4098@sip.cwi.nl url: https://www.cwi.nl/people/niels e-mail: Niels.Nes@cwi.nl
Indeed, the statistics gathering is in flux. Pending a new definition in the next feature release. An example proper use is shown below. 12 denotes the sample size, 1 denotes identifying min/max values. sql>call sys.analyze(1,12,'sys','lineitem'); sql>select * from statistics; +-----------+---------+-------+----------------------------+--------+----------+--------+------+---------------+-------------------------------+--------+ | column_id | type | width | stamp | sample | count | unique | nils | minval | maxval | sorted | +===========+=========+=======+============================+========+==========+========+======+===============+===============================+========+ | 7377 | int | 4 | 2015-09-19 08:08:45.000000 | 12 | 59986052 | 0 | 0 | 1 | 60000000 | true | | 7378 | int | 4 | 2015-09-19 08:08:47.000000 | 12 | 59986052 | 0 | 0 | 1 | 2000000 | false | | 7379 | int | 4 | 2015-09-19 08:08:48.000000 | 12 | 59986052 | 0 | 0 | 1 | 100000 | false | | 7380 | int | 4 | 2015-09-19 08:08:49.000000 | 12 | 59986052 | 0 | 0 | 1 | 7 | false | | 7381 | decimal | 8 | 2015-09-19 08:08:49.000000 | 12 | 59986052 | 0 | 0 | 100 | 5000 | false | | 7382 | decimal | 8 | 2015-09-19 08:08:50.000000 | 12 | 59986052 | 0 | 0 | 90091 | 10494950 | false | | 7383 | decimal | 8 | 2015-09-19 08:08:50.000000 | 12 | 59986052 | 0 | 0 | 0 | 10 | false | | 7384 | decimal | 8 | 2015-09-19 08:08:51.000000 | 12 | 59986052 | 0 | 0 | 0 | 8 | false | | 7385 | char | 1 | 2015-09-19 08:08:56.000000 | 12 | 59986052 | 0 | 0 | "A" | "R" | false | | 7386 | char | 1 | 2015-09-19 08:09:01.000000 | 12 | 59986052 | 0 | 0 | "F" | "O" | false | | 7387 | date | 4 | 2015-09-19 08:09:01.000000 | 12 | 59986052 | 0 | 0 | 1992-01-02 | 1998-12-01 | false | | 7388 | date | 4 | 2015-09-19 08:09:02.000000 | 12 | 59986052 | 0 | 0 | 1992-01-31 | 1998-10-31 | false | | 7389 | date | 4 | 2015-09-19 08:09:02.000000 | 12 | 59986052 | 0 | 0 | 1992-01-03 | 1998-12-31 | false | | 7390 | char | 1 | 2015-09-19 08:09:08.000000 | 12 | 59986052 | 0 | 0 | "COLLECT COD" | "TAKE BACK RETURN" | false | | 7391 | char | 1 | 2015-09-19 08:09:13.000000 | 12 | 59986052 | 0 | 0 | "AIR" | "TRUCK" | false | | 7392 | varchar | 4 | 2015-09-19 08:09:17.000000 | 12 | 59986052 | 0 | 0 | " Tiresias " | "zzle? slyly regular instruc" | false | +-----------+---------+-------+----------------------------+--------+----------+--------+------+---------------+-------------------------------+--------+ 16 tuples (3.692ms) On 19/09/15 09:19, Niels Nes wrote:
On Fri, Sep 18, 2015 at 07:14:45PM +0200, Robert Koch wrote:
Following the manual
https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/statistics
I am trying to reproduce this, but it fails with a type conversion error:
sql>call sys.analyze('sys', 'types'); conversion of string 'sys' to type int failed. sql>SELECT * FROM sys.statistics; +-----------+------+-------+-------+--------+-------+--------+------+--------+--------+ | column_id | type | width | stamp | sample | count | unique | nils | minval | maxval |> +===========+======+=======+=======+========+=======+========+======+========+========+ +-----------+------+-------+-------+--------+-------+--------+------+--------+--------+ 0 tuples (3.013ms) !1 column dropped!
Tried it with different schema/table/column names. Both with system and user-generated tables. Always the same error.
Running 11.21.5 here. just call analyze sys.types;
Niels
Thanks. _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
participants (3)
-
Martin Kersten
-
Niels Nes
-
Robert Koch