[SHUTDOWN] Should I shutdown embedded data base ?

2006-03-29 Thread yves pielusenet
Hello, I'm newto Derby. My application connecte and create a database using driver org.apache.derby.jdbc.EmbeddedDriver and url jdbc:derby:/my/path/to/database;create=True. I do my inserts, commit and at the end I do myConnection.close(). All works fine :) But I have just seen that there is a

Re: [SHUTDOWN] Should I shutdown embedded data base ?

2006-03-29 Thread yves pielusenet
Le mercredi 29 mars 2006 à 09:35 -0800, Stanley Bradbury a écrit : yves pielusenet wrote: Hello, I'm newto Derby. My application connecte and create a database using driver org.apache.derby.jdbc.EmbeddedDriver and url jdbc:derby:/my/path/to/database;create=True. I do my inserts, commit

Re: [SHUTDOWN] Should I shutdown embedded data base ?

2006-03-30 Thread yves pielusenet
Le jeudi 30 mars 2006 à 10:17 +0200, Oystein Grovlen - Sun Norway a écrit : yves pielusenet wrote: Thank you for your answer :) So, since I use an embedded database, should I use the shutdown command (database shutdown nor derby shutdown) everytime I do Connection.close() ? (an if so

Re: [SHUTDOWN] Should I shutdown embedded data base ?

2006-03-30 Thread yves pielusenet
Le jeudi 30 mars 2006 à 10:55 +0200, Oystein Grovlen - Sun Norway a écrit : yves pielusenet wrote: Le jeudi 30 mars 2006 à 10:17 +0200, Oystein Grovlen - Sun Norway a écrit : yves pielusenet wrote: Thank you for your answer :) So, since I use an embedded database, should I use

Re: [SELECT][RESULTSET] How Derby deals with very large select ?

2006-03-30 Thread yves pielusenet
Le jeudi 30 mars 2006 à 13:19 -0800, Rajesh Kartha a écrit : yves piel wrote: Hello, I have a table with more than 1,000,000 records. I have to iterate over all records (from the first to the last) very quicly. What is the best way ? Is I do a naive 'select * from data' how long the

Iterate over big table...

2006-05-19 Thread yves pielusenet
Hello, I have such a table : CREATE TABLE data ( numvign INTEGER PRIMARY KEY, data BLOB NOT NULL ) This table should have millions of records. I have to iterate over all records. What is the best way (I don't want to have a outOfMemoryException) : for(int i=0; inbRows; i++){ theData =

Re: Iterate over big table...

2006-05-19 Thread yves pielusenet
solution is more charming. Richter yves pielusenet escreveu: Hello, I have such a table : CREATE TABLE data ( numvign INTEGER PRIMARY KEY, data BLOB NOT NULL ) This table should have millions of records. I have to iterate over all records. What is the best way (I

[MEMORY] Derby full fill my the JVM memory

2006-05-22 Thread yves pielusenet
Hello, I have this error : java.lang.OutOfMemoryError: Java heap space So I used a profiler to see what was wrong. I have very lots of object of that classes : org.apache.derby.impl.store.raw.data.StoreRecordHeader org.apache.derby.impl.store.raw.data.RecordId (I can't find those classes into

Re: [MEMORY] Derby full fill my the JVM memory

2006-05-22 Thread yves pielusenet
Here is how I connect to the database : String url = jdbc:derby:+purl+pdbname+;create=+cancreatedb; String driver = org.apache.derby.jdbc.EmbeddedDriver; Class.forName(driver); con = DriverManager.getConnection(url, user, passwd); con.setAutoCommit(false); And here is how I execute sql

Re: [MEMORY] Derby full fill my the JVM memory

2006-05-22 Thread yves pielusenet
Yes I do commit every 'n' ( I choose 50) insert. Le lundi 22 mai 2006 à 14:55 -0300, Edson Carlos Ericksson Richter a écrit : You do a commit after like int n = psInsert.executeUpdate(); con.commit(); ??? (I've not seen this piece of code there...) Richter yves pielusenet

Re: [MEMORY] Derby full fill my the JVM memory

2006-05-22 Thread yves pielusenet
How thank you I didn't see this answer before. therefore, It seems complicated :c\ Le lundi 22 mai 2006 à 10:34 -0700, Stanley Bradbury a écrit : yves pielusenet wrote: Hello, I have this error : java.lang.OutOfMemoryError: Java heap space So I used a profiler to see what was wrong. I have

[MEMORY]Free memory

2006-05-31 Thread yves pielusenet
Hello, I developpe an application which create several derby databases. It may be 2 ddatabase or 100. In my application, I have a class which create those databases and connexions. Here the constructor method : ---

Re: [MEMORY]Free memory

2006-05-31 Thread yves pielusenet
Yes :) that was it ! thank you very much bryan :) Le mercredi 31 mai 2006 à 07:07 -0700, Bryan Pendleton a écrit : Is there something to do closing a database to free all memory use by this database ? In addition to committing and closing your connections, you can also shut down the

Re: [MEMORY]Free memory

2006-05-31 Thread yves pielusenet
databases are shutdown (at the same time)): http://narma.free.fr/depot/avecShutdown.png It is the same application and the second screen shoot has been taken more longer after then the first. So I save ~40M :c) Le mercredi 31 mai 2006 à 16:43 +0200, yves pielusenet a écrit : Yes

Re: [MEMORY]Free memory

2006-06-02 Thread yves pielusenet
Le jeudi 01 juin 2006 à 10:15 +0200, John Embretsen a écrit : yves pielusenet wrote: Here is two screenshoots of jmp (Java Memory Profiler). My application create 10 derby database (2 by 2). So before when I didn't shutdown database (look at the Heap size = 63.5MB) : http

Re: Iterate over big table...

2006-06-12 Thread yves pielusenet
Le vendredi 19 mai 2006 à 13:13 -0700, Stanley Bradbury a écrit : yves pielusenet wrote: Hello, I have such a table : CREATE TABLE data ( numvign INTEGER PRIMARY KEY, data BLOB NOT NULL ) This table should have millions of records. I have to iterate over all records. What

Re: Iterate over big table...

2006-06-12 Thread yves pielusenet
-- yves piel [EMAIL PROTECTED] wrote: yves pielusenet writes: Le vendredi 19 mai 2006 à 13:13 -0700, Stanley Bradbury a écrit : yves pielusenet wrote: Hello, I have such a table : CREATE TABLE data

DROP IF NOT EXISTS

2006-09-14 Thread yves pielusenet
I wonder if there is something similare like : 'drop index id_index if not exists' ? I want to put a condition on a drop statement but it fails. how can I do ? thanks , -- yves piel

Re: Retreive colummn name of a table from java

2006-09-14 Thread yves pielusenet
On 9/14/06, yves pielusenet [EMAIL PROTECTED] wrote: Hello, I read this : http://wiki.apache.org/db-derby/ListTableColumns but I can't retreive the column of my table 'data'. Here is what i tested : ij select columnnumber

Re: DROP IF NOT EXISTS

2006-09-14 Thread yves pielusenet
Thank you :) Le vendredi 15 septembre 2006 à 01:55 +0200, Bernt M. Johnsen a écrit : yves pielusenet wrote: I wonder if there is something similare like : 'drop index id_index if not exists' ? I want to put a condition on a drop statement but it fails. how can I do ? You could do

Retreive colummn name of a table from java

2006-09-14 Thread yves pielusenet
Hello, I read this : http://wiki.apache.org/db-derby/ListTableColumns but I can't retreive the column of my table 'data'. Here is what i tested : ij select columnnumber, columnname, columndatatype from sys.systables t, sys.syscolumns, sys.sysschemas s where tableid=referenceid and

Re: Retreive colummn name of a table from java

2006-09-15 Thread yves pielusenet
/14/06, yves pielusenet [EMAIL PROTECTED] wrote: after tests I found this statement : ij select columnname, columnnumber from sys.systables, sys.syscolumns where referenceid=tableid and tablename='DATA' order by columnnumber; which works well

Re: Retreive colummn name of a table from java

2006-09-15 Thread yves pielusenet
) such as: ij select columnnumber, columnname, columndatatype from sys.systables t, sys.syscolumns, sys.sysschemas s where tableid=referenceid and t.schemaid=s.schemaid and schemaname='APP' and tablename='DATA' order by columnnumber; On 9/14/06, yves pielusenet [EMAIL PROTECTED] wrote

Re: Retreive colummn name of a table from java

2006-09-15 Thread yves pielusenet
not restricted the query against any particular schema, hence it picked it up. On 9/15/06, yves pielusenet [EMAIL PROTECTED] wrote: Thank you Francois :) It works with that schema. but what is the difference between APP and SYS ? And the result is the same