Hi,
I am getting some strange exceptions using MonetDB JDBC 1.8/1.9, and I
decided to look into the code. While inspecting the code I came across
these strange lines in MonetConnection.executeQuery(String[] templ,
String query) method
(http://dev.monetdb.org/hg/MonetDB/file/718da8ca0a1a/java/src/nl/cwi/monetdb…).
In my case, these lines are executed for sure when doing a batch
insert. So, suppose that the batch contains the following commands (as
constructed by the MonetStatement.executeBatch() method):
exec 1(1, 957339737330229055);
exec 1(2, 278262503670654331);
exec 1(805306369, 3763943296910752235)
The lines in question take the above commands as a string, prepend a
's' character and append a ';' at the end. The resulting commands,
which are written in the server's socket, are the following:
sexec 1(1, 957339737330229055);
exec 1(2, 278262503670654331);
exec 1(805306369, 3763943296910752235);
First of all, I am not familiar with the internals of JDBC drivers.
Taking this into account, is this what it should be? From a symmetric
point of view, I would assume that the correct would be the following:
sexec 1(1, 957339737330229055);
sexec 1(2, 278262503670654331);
sexec 1(805306369, 3763943296910752235);
That is, it should prepend a 's' character before an exec command.
Last, are these exec commands (with or without a prepending 's')
specific to MonetDB? In either case, is there any documentation to get
familiar with their meaning?
Thanks a lot,
Babis
Hi guys,
I'm pretty new for Monetdb, As per the introduce of the online document, I
have to type the password on the command line window when I want to execute
SQL via the mclient program. It there a way like this which can be used in
Mysql: "mysql --user --password databasename -e SQL" in monetdb? I didn't
found the argument that can used for the "password" in mclient.
Thanks,
Tony
Hi there,
Thanks again for your last replies regarding the insertion into base. Using COPY INTO worked like a charm.
A production deployment means :
- Backup
- High availability
So my questions here, not addressed in the online docs are :
- Regarding backup, is there a way to make a consistent backup (I mean putting the DB in a "backuping state", and save/archive the files)
- To allow for high availability, can I use clusterization ? Can horizontal scalability be achieved through clusterization ?
Thank you !
The MonetDB team at CWI/MonetDB BV is pleased to announce the
Dec2011 feature release of the MonetDB suite of programs.
More information about MonetDB can be found on our website at
http://www.monetdb.org/.
For details on this release, please see the release notes at
<http://www.monetdb.org/Downloads/ReleaseNotes>.
As usual, the download location is <http://dev.monetdb.org/downloads/>.
Dec 2011 feature release
SQL * mclient: The csv output format can now also be of the
form csv=c and csv+c where c is the column separator.
The form with csv+ produces a single header line with
column names.
* Changed a bug where the sign() function returned the
same type as its argument instead of always an
INTEGER.
* Added a fix for bug #2834, which caused weird
(failing) behaviour with PreparedStatements.
* Fixed a bug when using default values for interval
columns. Bug 2877.
* A bug was fixed where deleted rows weren't properly
accounted for in all operations. This was bug 2882.
* A bug was fixed which caused an update to an internal
table to happen too soon. The bug could be observed on
a multicore system with a query INSERT INTO t (SELECT
* FROM t) when the table t is "large enough". This was
bug 2883.
Java Module * Implemented getMetaData() method of PreparedStatement.
* Fixed an AssertionError for special results from e.g.
EXPLAIN queries.
* Fixed overflow error when batching large statements,
bug #2952
* Resolved a concurrency problem where ResultSet's
date-related getters could cause odd stack traces when
used by multiple threads at the same time, bug #2950.
* JDBC now implements JDBCv4.1 which makes it possible
to be built with Java 7 and up. JDBCv4.1 is a
maintenance release of JDBCv4, and hence can be
compiled with Java 6, although the added methods
obviously are not part of the java.sql interfaces.
* SQLExceptions thrown now carry a SQLSTATE. Until the
server starts sending correct SQLSTATEs for all
errors, server originated errors without SQLSTATE are
considered generic data exceptions (22000).
* Fixed a bug where closing ResultSets and
PreparedStatements could lead to errors on concurrent
running queries using the same Connection due to a
race condition.
* Changed version scheme of JDBC driver and MCL jar to
be more standard, from monetdb-X.Y-<thing>.jar to
monetdb-<thing>-X.Y.jar, bug #2943
* The embedded monet instance capability of
MonetConnection was removed.
* Bump JDBC version to 2.0 (Liberica). JDBC now
implements JDBCv4 which makes it possible to be built
with Java 6 and up. Java 5 and before are no longer
supported, and can use the 1.x releases of the driver.
* INTERVAL columns are now treated as decimals, since
they can have sub-second precision.
Client Package * Fix making connections with stethoscope to hosts
without monetdbd. Bug #2944.
* Fixed some bugs in the PHP interface affecting the
mapi_ping(), monetdb_insert_id() and auto_commit()
functions. Bugs #2936, #2937, #2938.
* ODBC: Fixed SQLNumResultCols and SQLDescribeCol to
return useful information after a call to SQLPrepare
and before any SQLExecute.
* mclient: The exact interpretation of the -i
(--interactive) option and the - filename argument
have changed. The - filename argument means read from
standard input and no longer implies that no \
interpretation is done on the input. Instead, \
interpretation is done if either standard input is a
terminal, or if the -i option is given. The -i option
no longer causes mclient to read from standard input.
It only means to do \ interpretation when reading from
standard input. Use the - filename argument to read
from standard input. Note that if no -s option is
specified and no filename arguments are present,
mclient still reads from standard input.
* ODBC: Improved internal query for SQLSpecialColumns.
Before, the query returned all columns taking part in
a PRIMARY KEY *and* all columns taking part in a
UNIQUE constraint. Now it returns only one or the
other set.
* ODBC: The database name is now used as the catalog
name throughout. Functions that return a catalog name
return the database name, and functions that match on
catalog name match it with the database name.
* ODBC: Implemented an easier way to create a log file
of interactions with the ODBC driver. You can now add
a connection attribute "LOGFILE=filename" to the
connection string parameter of SQLBrowseConnect and
SQLDriverConnect, and to the relevant part of the
Windows registry or odbc.ini file. This value is only
used if there is no environment variable ODBCDEBUG.
* Quoting of object names for mclient's \d command is
now more flexible and consistent with standard SQL
quoting rules, bug #2846.
* ODBC: Implemented SQLColumnPrivileges function.
* Install new program, mnc, which provides netcat
functionality, but based on MonetDB's communication
libraries
* Report full URI to database instead of just database
when available in mclient.
* The time format of the timer output can now be
controlled with an optional argument to the -i option.
ms, s and m force the time to be formatted as
milliseconds, seconds or minutes + seconds
respectively.
* ODBC: Implemented a workaround in SQLTables for bug
2908.
* Small improvement to mclient's table rendering for
tables without any rows. Previously, the column names
in the header could be squeezed to very small widths,
degrading readability.
* Python DB API connect() function now supports PEP
249-style arguments user and host, bug #2901
* mclient now checks the result of encoding conversions
using the iconv library.
* Fixed a source of crashes in mclient when a query on
the command line using the -s option is combined with
input on standard input (e.g. in the construct mclient
-s 'COPY INTO t FROM STDIN ...' < file.csv).
* Fixed bug 2897 where slow (network) reads could cause
blocks to not be fully read in one go, causing errors
in the subsequent use of those blocks. With thanks to
Rémy Chibois.
* Fixed a bug in mclient where processing queries from
files could result in ghost empty results to be
reported in the output
* Fixed Perl DBD rowcount for larger results, bug #2889
* Perl: We now distinguish properly between TABLE and
GLOBAL TEMPORARY (the latter are recognized by being
in the "tmp" schema).
* Perl: fixed a bunch of syntax errors. This fixes bug
2884. With thanks to Rémy Chibois.
* Perl: Fixed DBD::monetdb table_info and
tabletype_info. This fixes bug 2885. With thanks to
Rémy Chibois.
* mclient: fix display of varchar columns with only NULL
values.
* Fixed a bug in mclient/msqldump where an internal
error occurred during dump when there are GLOBAL
TEMPORARY tables.
MonetDB5 Server * A couple of memory leaks have been plugged.
* Introduced new variable max_clients that allows to
define how many concurrent connections are allowed to
be made against the database.
* mal_interpreter.mx Protect against concurrent
exceptions If multiple parallel blocks access the
exception variables and perform GDKfree on old
messages, then we may enter a case that one thread
attempts a second free. Simple lock-based protection
is the first line of defense.
* bpm and partitions have been moved to the attic. It is
replaced by the partition optimizer, still under
construction.
* The MAL debugger next/step operations semantics have
been fixed. The profiler also now clearly shows
entrance/exit of a MAL function.
* The dataflow optimizer uses a less strict side-effect
test for BAT new operations and better recognizes
trivial plans.
* Fixed a problem where MAL variables weren't properly
cleared before reuse of the data strucutre. This
problem could cause the data flow scheduler to
generate dependencies between instructions that didn't
actually exist, which in turn could cause circular
dependencies among instructions with deadlock as a
result. Bugs 2865 and 2888.
Merovingian * Fixed crash in monetdb when an invalid property was
retrieved using the get command, bug #2953.
* monetdb get output is now grouped by database instead
of by property
* Unlike in previous releases, 'monetdbd get mserver'
now returns the path to the mserver5 binary only for
dbfarms that have a running monetdbd, instead of only
for those that are not served by a monetdbd.
* Add nclients property that controls the maximum number
of concurrent clients allowed to access the database
* Starting monetdbd without any arguments or without
dbfarm is no longer supported. A dbfarm now must be
provided for each command.
* The control passphrase has been turned into a hash of
the password, for a more stronger authorisation model
as used by mclients. On upgrade, any existing
passphrase is converted to the hashed version of the
passphrase.
* The monetdbd controlport option has been removed in
favour of a boolean control option. On upgrade, when
controlport was set to a non-zero value and a
passphrase was set, control is set to true, or false
otherwise.
* The monetdbd discoveryport option has been removed in
favour of a boolean discovery option. On upgrade, when
discoveryport was set to a non-zero value, discovery
is set to true, or false otherwise.
* Fixed a bug where monetdbd's socket files from /tmp
were removed when a second monetdbd was attempted to
be started using the same port.
* Resolved problem where monetdbd would terminate
abnormally when databases named 'control', 'discovery'
or 'merovingian' were stopped.
* monetdbd get status now also reports the version of
the running monetdbd
* Improved response time of 'monetdb start' when the
database fails to start.
* Fixed a bug in monetdbd where starting a failing
database could incorrectly be reported as a 'running
but dead' database.
* To avoid confusion, all occurrences of merovingian
were changed into monetdbd for error messages sent to
a client.
MonetDB Common * Fixed memory detection on 32-bits Solaris systems with
more memory than can be addressed in 32-bits mode, bug
#2935
Bug Fixes
Hi,
I need to measure the sql query execution time of several queries. The
mclient "-t" option does not exist in the newer version, and the "\<
file_with_queries" SQL command does not seem to show the time when importing
from a file. Any ideas??
--
View this message in context: http://old.nabble.com/measure-performance-time-tp33201681p33201681.html
Sent from the monetdb-users mailing list archive at Nabble.com.
Hi,
I'm observing disk I/O when evaluating some queries which I am unable to
explain. I have two datasets, one relatively small with the BATs taking
up 1.6 MB on disk and one fairly large with 283 MB on disk.
According to iostat, when I evaluate the attached query on the small
dataset, 100 MB are written to disk, but none are read. This is on a
Linux machine with 4 GB RAM running the Aug2011-SP3 release.
I don't understand why data is written on disk, that
(a) is never read again and
(b) would easily fit into main memory.
I am unable to evaluate the queries on the large dataset because MonetDB
writes so much data that the disk fills up after a few minutes (more
than 22GB).
Please let me know if I can provide more information.
Cheers,
Viktor
Hello
I am interested about current state of MonetDB/X100 project?
It is freely available? It is part of current MonetDB 5 project?
Can we expect some progress and possible availability under some open
source licence?
Thank you for information
Best regards
Pavel Stehule
Greetings MonetDB developers!
I'm preparing MonetDB for an application, and I got the current error from the ODBC:
[MonetDB][ODBC Driver 11.5.9]Cannot return the number of output columns. Query must be executed first.
I'm using Windows 7 Ultimate 64bits with both ODBC x86 and x64, but the system and also the Microsoft Excel only find the x86 driver.
How can I overcome this?
Thank you very much.
I'm evaluating MonetDB and importing an SQL file containing INSERT statements, so that I can populate the following table :
CREATE TABLE session
(
cmd character varying(25),
date bigint,
session_id character varying(64),
score integer,
src_ip character varying(25),
dst_ip character varying(25),
tx_bytes integer,
rx_bytes integer,
retx_bytes integer,
scrambling character varying(16),
url character varying(64),
country character varying(32),
orig character varying(3),
status integer
)
No index was created.
>From what I can see, I'm somewhere between 20 and 40 insertions per second (Core i5, 4GB RAM, Windows7, MonetDb MonetDB5-SQL-Installer-i386-20111021.msi).
The Windows task manager shows a disk write throughput of 300 kB/s which looks like very small, processor usage around 5%.
I imported the file with mclient -u monetdb < myfile.sql
I expected to import at 200 rows/second minimum. Am I doing something wrong ?
What can be done to improve the loading speed ?
Thank you
SC