Hi,
i hit a strange problem when using alias for an expression in group by
i run into this with a complex view containing multiple UNION ALL
queries but after a while everything boiled down to a fairly simple test
case that will always produce the error
Welcome to mclient, the MonetDB/SQL interactive terminal (Feb2013-SP1)
Database: MonetDB v11.15.3 (Feb2013-SP1),
'mapi:monetdb://lux-analytics:50000/zkdev1'
Type \q to quit, \? for a list of available commands
auto commit mode: on
sql>CREATE VIEW mmtest_v AS SELECT date'2012-01-01' as period, 1 as
quantity;
operation successful (213.074ms)
sql>SELECT extract(month from period) as m, count(1) as cnt FROM
mmtest_v GROUP BY m;
*Connection terminated*
I am on Ubuntu 12.04.2 LTS
As the alias in GROUP BY works in other cases i expect this is a bug -
pls confirm and i will be happy to file it.
BTW it looks like MonetDB has generally issues with selects from more
complex views - i.e. views based on another view(s).
In such cases the results do not match expectations or there is even an
error. I can reproduce the problem but i only on quite large set of data
(typically 20+ mil. records) and after some data manipulation got
involved, so i cannot give a simple test case as above.
Any idea how to pass such problem (when large data-set is involved) to
the development team?
Thanks in advance
milan
Hi Team,
Please may I ask what main memory management strategy has been adopted for MonetDB in terms of memory utilization. For example I loaded the TPCH benchmark dataset in MonetDB (v11.13.5) with scale factor 40. The data on disk is 43Gb in size. But when I run the TPCH queries then the main memory used by mserver stays in the range of 0.5GB to 3GB.
I was thinking that the monetDB would load the tables into memory because TPCH queries are doing joins over various tables but it seems that monetdb loads only small subset of the complete dataset.
Please can someone explain what is going in the background and why I always see 0.5GB to 3GB memory resident size of mserver process even for dataset of size 43G and if this is the normal expected behaviour of monetdb?
The farm size on disk is:
farms/f1/db1/bat# du . -hs
48G .
Thanks.
Kind Regards, Ahmad
Sterling,
Thanks for notifing!
Could you please file a bug report via http://bugs.monetdb.org/ ?
Thanks!
Stefan
Sterling Paramore <gnilrets(a)gmail.com> wrote:
The link at http://www.monetdb.org/Downloads/Tutorial is broken and I don't
see any way to contact the creators of the web page. How can I get
information about how to install MonetDB?
Thanks,
Sterling
Sterling,
did you start the monetdb daemon (monetdbd), first?
See also
http://www.monetdb.org/Documentation/monetdbd
Stefan
Sterling Paramore <gnilrets(a)gmail.com> wrote:
Thanks, but I'm not terribly interested in building from source. These
installation instructions seem to end after it's compiled. I downloaded
the binaries for OS X and put them in /usr/local/monetdb, and added
/usr/local/monetdb/bin to my PATH. I found
http://www.monetdb.org/Documentation/Tutorial (which is maybe supposed to
be the same thing as the broken link?) But when I try the first step, I
get the following error:
[- opt -] monetdb create /opt/monetdb
monetdb: cannot find a control socket, use -h and/or -p
Google was not helpful.
Any ideas?
Thanks,
Sterling
On Tue, Mar 19, 2013 at 6:52 PM, Hassan, Ahmad <ahmad.hassan(a)sap.com> wrote:
> HI Sterling,****
>
> ** **
>
> Installation from source can be seen at:
> http://www.monetdb.org/wiki/MonetDB:Building_from_sources****
>
> ** **
>
> Cheers, Ahmad****
>
> ** **
>
> *From:* users-list-bounces+ahmad.hassan=sap.com(a)monetdb.org [mailto:
> users-list-bounces+ahmad.hassan=sap.com(a)monetdb.org] *On Behalf Of *Sterling
> Paramore
> *Sent:* 20 March 2013 01:49
> *To:* users-list(a)monetdb.org
> *Subject:* Quickstart Guide****
>
> ** **
>
> The link at http://www.monetdb.org/Downloads/Tutorial is broken and I
> don't see any way to contact the creators of the web page. How can I get
> information about how to install MonetDB?****
>
> ** **
>
> Thanks,****
>
> Sterling****
>
> _______________________________________________
> users-list mailing list
> users-list(a)monetdb.org
> http://mail.monetdb.org/mailman/listinfo/users-list
>
>
The link at http://www.monetdb.org/Downloads/Tutorial is broken and I don't
see any way to contact the creators of the web page. How can I get
information about how to install MonetDB?
Thanks,
Sterling
Hi,
I querying my database using a script in PHP and returning the result as a
JSON (so that it can be retrieved in Javascript).
However I notice that querying the database (sending the query to the
database) takes about half the time if takes PHP to retrieve the rows (row
by row using monetdb_fetch_object).
In the documentation I see that the MAPI interface has a fetch_all_rows
function, however I can't find this function in the PHP library. In the
Python example I see that you are also using a cursor.fetchall() procedure.
What is the best way to approach this problem > querying the database and
returning all rows as a JSON object
Is PHP the way to go (it is the easiest for me, since I know that), if it
is, what is the best way or should I consider another language like Python
or maybe Java to implement this function?
Below I list the PHP code I see that send the query ($q_statement) to the
database and formulating the JSON:
// Measure time
$time_end = microtime(true);
$execution_time = ($time_end - $time_start); //dividing with 60 will give
the execution time in minutes other wise seconds
error_log($execution_time.'sec - Formulate query');
$time_start = microtime(true);
$db = monetdb_connect($lang = "sql", $host = "127.0.0.1", $port = "50000"
, $username = "monetdb", $password = "monetdb", $database = "social" ) or
die(monetdb_last_error());
$res = monetdb_query($db, monetdb_escape_string($q_statement));
// Measure time
$time_end = microtime(true);
$execution_time = ($time_end - $time_start); //dividing with 60 will give
the execution time in minutes other wise seconds
error_log($execution_time.'sec - Query database');
$time_start = microtime(true);
/* Iterate over the result set returning rows as objects */
while ( $row = monetdb_fetch_object($res) )
{
$rows[] = $row;
}
echo json_encode($rows);
// Measure time
$time_end = microtime(true);
$execution_time = ($time_end - $time_start); //dividing with 60 will give
the execution time in minutes other wise seconds
$total_execution_time = ($time_end - $initial_start);
error_log($execution_time.'sec - Return records');
error_log($total_execution_time.'sec - Total time');
$time_start = microtime(true);
thanks in advance,
Richard
Hi,
I ran into a problem when setting up a user with single quotes:
sql>CREATE USER 'tpch' WITH PASSWORD 'tpch' NAME 'TPC-H Admin' SCHEMA 'sys';
syntax error, unexpected STRING in: "create user 'tpch'"
Then I followed exactly the quatation style of the voc example and it
worked:
sql>CREATE USER "tpch" WITH PASSWORD 'tpch' NAME 'TPC-H Admin' SCHEMA "sys";
operation successful (3.663ms)
So now with user and schema enclosed in double quotes, password and name in
single quotes, it worked. This inconsistent usage of single and double
quotes seems a bit strange to me. Should I file a bug report for this? Or
is there a specific reason for this?
As a final test I enclosed all values in double quotes:
sql>CREATE USER "test2" WITH PASSWORD "test2" NAME "Test User 2" SCHEMA
"sys";
syntax error, unexpected IDENT, expecting STRING in: "create user "test2"
with password "test2""
Thanks,
Diethard
Hi,
When I run this:
SELECT DISTINCT(EXTRACT(QUARTER FROM o_orderdate)) FROM orders;
I get following error:
Error: syntax error, unexpected IDENT in: "select distinct(extract(quarter"
SQLState: 42000
ErrorCode: 0
Is Quarter not supported or is this a bug? Extract Year, month, day are all
working fine.
Environment: RHEL (Amazon Linux), Latest version of MonetDB compiled from
source code.
Thanks,
Diethard
Hi,
I am trying to connect Tableau to a MonetDB instance which is running in a
linux machine, using the ODBC MonetDB driver.
Tableau manages to connect to MonetDB and is able to list the tables, but
then it fails with the following error while performing any Analysis:
[MonetDB][ODBC Driver 11.13.9] Invalid identifier 'none:product:nk'
>
I tried two versions of the ODBC, the latest and Oct2012-SP, but the
problem is present in both versions.
It's worth pointing that I am able to use the same MonetDB with the JDBC
with no problems.
<http://dev.monetdb.org/downloads/Windows/Oct2012-SP3/>
While googling for this particular problem, I found the following mail in
the mailing list:
http://mail.monetdb.org/pipermail/users-list/2011-November/005248.html
Has there been any developments in this field?
Best regards,
Pedro Salgueiro
Hi,
I'm trying to find an aggregate function to find standard deviation. Does
monetDB support such a function?
For example:- to find the average of the selected values we can use- Select
AVG(age) from students where grade = 4;
I was taking the help of google and found this link-
http://old.nabble.com/users-list-Digest,-Vol-3,-Issue-8-td34660082.html
Then I tried the solution given by Percy Wegmann in the above link. After
that when I run this query- Select STDEV(age) from students where grade = 4;
[Age being a column of type double AND I get similar kind of error for int]
I get this error -
TypeException:user.s1_1[21]:'aggr.stddev' undefined in: _33:any :=
aggr.stddev(_
32:bat[:oid,:dbl])
program contains errors
I need to have this function working in order to be able to use MonetDB.
Kindly help.
Regards,
Anshuman