On Wed, Mar 24, 2010 at 11:35:35AM +0100, Miguel Ángel Águila Lorente wrote:
Hi,
firstly I began working with jdbc but the time that spends loading the file is so much expensive.
well, the obvious first questions are How do you laod the file? and Why is it expensive? and What do you mean with "expensive"? I.e., how loang does it take? How big is your file? What are the characteristics of your system (hardware, operating system, etc.)? Or in other words, first find out where time goes (and why) ...
I thought that working directly with MAL I could improve this time.
Well, that can of course only help if the performance problem is JDBC related.
Are there so diference between MAL or SQL? or doing the database with sql worse the time?
In essence, SQL is translated to MAL, hence, SQL is just as fast as MAL. Stefan
Thanks.
Mike
El mié, 24-03-2010 a las 11:24 +0100, Stefan Manegold escribió:
Hi Mike,
before going into details about MAL (I'd need to look that up myself) my question is why are you using MAL and not standard SQL?
In SQL, you could easily load your table using
CREATE TABLE MyTable (Col_1 int, Col_2 int, Col_3 int); COPY
RECORDS INTO MyTable FROM ' ' USING DELIMITERS ';',';\n'; E.g.: $ cat /tmp/data.csv 11;21;31; 12;22;32; 13;23;33; $ mclient -lsql Welcome to mclient, the MonetDB/SQL interactive terminal Database: MonetDB v5.18.2, 'demo' Type \q to quit, \? for a list of available commands auto commit mode: on sql>CREATE TABLE MyTable (Col_1 int, Col_2 int, Col_3 int); operation successful sql>COPY 3 RECORDS INTO MyTable FROM '/tmp/data.csv' USING DELIMITERS ';',';\n'; 3 affected rows sql>select * from MyTable; +-------+-------+-------+ | col_1 | col_2 | col_3 | +=======+=======+=======+ | 11 | 21 | 31 | | 12 | 22 | 32 | | 13 | 23 | 33 | +-------+-------+-------+ 3 tuples sql>
I would recommend to use plain MAL directly, only if you have a very special reason to do so that prohibits using SQL.
Stefan
On Wed, Mar 24, 2010 at 10:33:54AM +0100, Miguel Ángel Águila Lorente wrote:
Hello,
I'm creating a database with MAL. I would need help for creating bats with the information of a file. May be It could be posible to do with tablet.load but I still not know how it works. The format of the file is quite simple:
int;int;int; int;int;int;
I expect you can help me. Thank you.
Mike
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4199 |