Re: Speed of using Derby DB

2008-06-11 Thread Thomas Nielsen
y* be that the reason for the slow execution is outdated index cardinality statistics. Check out "CALL SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE" either on nabble or in the derby docs. -- Thomas Nielsen

Re: Problem with "order by"

2008-04-18 Thread Thomas Nielsen
Hi Bradley, Your problem is really not that bizarre. Using a order by clause in a subquery is actually not allowed in the SQL standard (neither SQL-99 nor SQL-2003) if you read the spec closely. I can only speculate why other DBs have decided to deviate from the standard. Derby attempts to adh

Re: Derby-10.3.2.2 Release Date

2008-04-18 Thread Thomas Nielsen
wrote: Is there any expected release date for derby 10.3.2.2, especially since it resolves this https://issues.apache.org/jira/browse/DERBY-3603 Best Regards David -- Thomas Nielsen

Re: Problem with derby 10.4

2008-04-15 Thread Thomas Nielsen
ing a index on the score column, and tailoring your query so that the optimizer chooses that index for the subquery select row retrieval, effectively ordering the result for you? There's still no guarantee the optimizer *will* use the index though. Cheers, Thomas -- Thomas Nielsen

Re: derby & hibernate & type 'text'

2008-04-14 Thread Thomas Nielsen
give the RC a quick spin to see if the problem is solved? Cheers, Thomas [1] http://ndpsoftware.com/HibernateMappingCheatSheet.html [2] http://wiki.apache.org/db-derby/DerbyTenFourRelease --> ReleaseCandidates -- Thomas Nielsen

Re: Problem with derby 10.4

2008-04-14 Thread Thomas Nielsen
caxo wrote: I have to take a certain number of rows ordered by a field. And the derby say me error: Syntax error: Encountered "ORDER" SELECT * FROM ( SELECT ROW_NUMBER() OVER () AS R, playerId, playerName, points FROM ranks ORDER BY points DESC ) AS TR WHERE R <= 10

Re: Statement/PreparedStatement performance difference and problem

2008-04-09 Thread Thomas Nielsen
following properties DOMAINKEY are 98% same. NAMEs are all different. CREATIONTIME 82% different. Hi, Derby's optimizer sometimes makes bad decisions because the cardinality statistics are outdated. You could see if this thread helps you: http://www.nabble.com/Re%3A-FW%3A-Advice-on-*very*-badly-performing-query-p14140691.html -- Knut Anders -- Thomas Nielsen

Re: Statement/PreparedStatement performance difference and problem

2008-04-08 Thread Thomas Nielsen
e scanned ? How can you make the prepared statement use the same execution plan as the statement so as to return the same type of performance? The problem seems to be Derby specific as MSQL returns adequate performance for ALT 1. Thanks in advance, -- Thomas Nielsen

Re: Derby and offset

2008-04-04 Thread Thomas Nielsen
Hi Pertti, Pertti Ylijukuri wrote: I have understood that in derby doesn't support offset in sql. Correct. Derby does not support offset. To my knowledge offset is actually not part of neither the SQL99 nor SQL2003 specs. Derby (attempts to) strictly adhere to these specs, and this is one of

Re: DERBY-3244 : NullPointerException - Release Date?

2008-04-04 Thread Thomas Nielsen
Hi Robert, To my knowledge there are no plans for a 10.3 maintenance release at this point. But, the derby 10.4 release candidate is just a few days away (and has the fix for 3244). Maybe you could give that a try to see whether it fixes the problems you experience? If that does not help,

Re: inexplicable query problem

2008-03-09 Thread Thomas Nielsen
Hi Ryan, Without knowing what version of derby you are using, I dare say you've hit DERBY-3301: http://issues.apache.org/jira/browse/DERBY-3301 The bug is basically a too optimistic optimization, causing derby to return the wrong result with nested "where [not] exists" queries. DERBY-3301

Re: Metadata Container RAF Exception

2008-03-05 Thread Thomas Nielsen
Jeffrey, With "M:" as your drive letter, I'm guessing you have the files on a mapped network share? Are you using Samba? There used to be file locking problems with Samba. Not sure whether they have been fixed or not, nor what versions were affected/fixed. Google is your friend here. The Samba

Re: java.sql.SQLDataException: The resulting value is outside the range for the data type DOUBLE.

2008-01-28 Thread Thomas Nielsen
Mark Thornton wrote: The more interesting question is whether those limits should remain different or should they be brought into alignment with Java Double (and add +-infinite and NaN as well). It would probably be good to fully support the java Double datatype, but see DERBY-3290 for some con

Re: Check for DB Existence on Start

2008-01-03 Thread Thomas Nielsen
games are on Xbox 360. Click here for a special offer on an Xbox 360 Console. Get it now! <http://www.xbox.com/en-US/hardware/wheretobuy/> -- Thomas Nielsen

Re: Is there a POW (power) or COS function in derby

2007-12-25 Thread Thomas Nielsen
Hi Jay, You'll find a list of all the built-in functions, and specifics of each, in the derby 10.3 reference manual http://db.apache.org/derby/docs/10.3/ref/ specifically in the topic "Built-in functions": http://db.apache.org/derby/docs/10.3/ref/rrefsqlj29026.html Hope this helps! Cheers

Re: Help Urgent:Apache derby network server

2007-12-21 Thread Thomas Nielsen
musky, That statement does not mean Derby has a limit of 25 concurrent clients. Like Brian said in his reply, Derby can handle thousands of connections, and they can all work at the same time. The statement is most likely the result of a simple "sanity test" the author of the article did, or

Re: Docs in alternate PDF format

2007-12-21 Thread Thomas Nielsen
format with a smaller page size? My lovely spouse bought me a Sony PRS-505 ebook reader and 8.5x11 pages come out frighteningly cramped (but still legible) on its 3.5x4.75 inch screen. I was thinking that documents that I refer to regularly would be a useful thing to put on it. Thank you, Donald -- Thomas Nielsen

Re: Double.NaN in table?

2007-12-19 Thread Thomas Nielsen
FYI: I filed handling NaN, POSITIVE_INFINITY and NEGATIVE_INFINITY as an improvement suggestion in jira: https://issues.apache.org/jira/browse/DERBY-3290 BR, Thomas Thomas Nielsen wrote: Continuing into the SQL 2003 foundation spec[3] I can't find any explicit mention of NaN/INF

Re: Double.NaN in table?

2007-12-19 Thread Thomas Nielsen
anguages - SQL - Part 2: Foundation (SQL/Foundation)" Thomas Nielsen wrote: Neither the JDBC 4.0 specification[1] nor "JDBC API Tutorial and Reference"[2] mention handling of the NaN or INFINITE numbers at all AFAICT. As there is no mention of how to handle *jdbc* doubles (and

Re: Double.NaN in table?

2007-12-19 Thread Thomas Nielsen
l* double (and literals). Cheers, Thomas [1] JSR-221, JDBC 4.0, http://jcp.org/aboutJava/communityprocess/final/jsr221/index.html [2] "JDBC API Tutorial and Reference, Third Edt.", Fisher, Ellis & Bruce, Addison-Wesley 2003. Andrew ``Bass'' Shcheglov wrote: On Dec

Re: Double.NaN in table?

2007-12-19 Thread Thomas Nielsen
on this? Seems your only option at the moment is to add another column to your table to flag NaN values. Thomas Thomas Nielsen wrote: I quickly tried both of Andrews 1) and 2) suggestions. Results pasted below. Summary: - both PreparedStatement.setDouble() and setFloat() throw the same

Re: Double.NaN in table?

2007-12-19 Thread Thomas Nielsen
Ls to represent NaNs at database level. Regards, Andrew. -- Thomas Nielsen

Re: Derby Equivalent of MySql queries

2007-11-22 Thread Thomas Nielsen
Hi Aneez, The LIMIT syntax is not part of the SQL standard (yet at least...), and may as such be considered a MySQL dialect. Derby does not support LIMIT, but we are working on implementing.the approach taken in the SQL standard using the ROW_NUMBER() function for the upcoming 10.4 release.Y

Re: Newbie Blues : Unable to connect to derby database using JDBC

2007-11-16 Thread Thomas Nielsen
ended only for Thomas. Please disregard :-)) Bernt M. Johnsen wrote (2007-11-16 09:56:00): Thomas Nielsen wrote (2007-11-16 08:17:17): It would probably be better to simply do catch (Throwable e) Neineinei. aldri be nybegynnere gjøre "catch Throwable". Det skal man ligge lan

Re: Newbie Blues : Unable to connect to derby database using JDBC

2007-11-15 Thread Thomas Nielsen
-- > Get easy, one-click access to your favorites. Make Yahoo! your homepage. > Never miss a thing. Make Yahoo your homepage. <http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs> -- Thomas Nielsen

Re: Restricting number of connections from a single user

2007-11-13 Thread Thomas Nielsen
opening too many connections -- Thomas Nielsen

Re: Is derby sql "real" equivalent to java "float"

2007-10-31 Thread Thomas Nielsen
Dag H. Wanvik wrote: I think this code is old DB2 compatibility code, which could possibly be lifted now. Does anyone know? IMHO this limitation should be lifted. Thomas -- Thomas Nielsen

Re: what is the best JVM to run derby on?

2007-10-30 Thread Thomas Nielsen
Thomas Nielsen wrote: Release testing (and automated nightly testing) is currently run on all 1.4, 1.5 and 1.6 JVMs AFAIK, given availablility. If you are interested in detailed information on some of the many OS/JVM combinations that were actually tested for the current 10.3.1.4 release

Re: what is the best JVM to run derby on?

2007-10-30 Thread Thomas Nielsen
a prefered JVM to use in order to run derby server? which is the most suitable for this task? -- Thomas Nielsen

Re: Hibernate comment in SQL - resolved

2007-10-24 Thread Thomas Nielsen
nateDialect="org.hibernate.dialect.DerbyDialect" Has anyone here hit this one before? TIA Nick -- Thomas Nielsen

Re: limit

2007-10-11 Thread Thomas Nielsen
this? DERBY-581 and DERBY-2998 are relevant, I believe. If you are interested in helping us work on this, there are lots of ways to help contribute to the effort, and we'd love to have more people involved! thanks, bryan -- Thomas Nielsen

Re: Returning NULL from a database-side Java function

2007-10-09 Thread Thomas Nielsen
Bryan Pendleton wrote: 1. Why does int pop = 0 == 0 ? 1 : null; even compile? For what it's worth, it doesn't compile for me: works with 1.5.0-13: C:\Program Files\Java\jdk1.5.0_13\bin>javac c:\tmp\pop.java C:\Program Files\Java\jdk1.5.0_13\bin> even with 1.5.0-07: C:\Program Files\Java\jdk1

Re: What is use of Derby on CDC devices?

2007-09-28 Thread Thomas Nielsen
and derby runs inside the JVM on the CDC device. You should probably start having a look at something like this page from the reference guide for 10.3: http://db.apache.org/derby/docs/10.3/ref/rrefjdbcjsr169.html Hope this gets you started :) Thomas -- Thomas Nielsen

Re: derby/jvm crashes

2007-09-28 Thread Thomas Nielsen
ilable from Sun that you could try, 1.5.0_12: http://java.sun.com/javase/downloads/index_jdk5.jsp Hope this helps :) Thomas -- Thomas Nielsen

Re: ODBC Driver for Derby?

2007-09-27 Thread Thomas Nielsen
that no longer supported? I found this on Google, does it help? http://www.ibm.com/developerworks/db2/library/techarticle/dm-0409cline2/index.html thanks, bryan -- Thomas Nielsen

Re: Accessing embedded database in JAR file

2007-08-10 Thread Thomas Nielsen
anks for letting the community know :) If you don't mind - what were your top three pains when moving from MySQL to Derby? Cheers, Thomas -- Thomas Nielsen

Re: Accessing embedded database in JAR file

2007-08-08 Thread Thomas Nielsen
wether you run embedded or not? Cheers, Thomas -- Thomas Nielsen

Re: Accessing embedded database in JAR file

2007-08-07 Thread Thomas Nielsen
to attempt a create table or another writing statement after connecting. As the jar'ed db is read-only, a writing statement should be rejected if you're really connected to the jar'ed db. Thomas Thomas Nielsen wrote: Hi Ryan, First of all, can you please state what version you a

Re: Accessing embedded database in JAR file

2007-08-07 Thread Thomas Nielsen
- I am just not sure where my tables are. Also, if I change the URL to access the the database on the filesystem (from the previous project's build) via the directory subprotocol, everything works. So, I know the database was created correctly at one point in time. I have been struggling with this for a day now and I am at a loss. Is there anything obvious I am doing wrong? Did I miss a configuration step to make a embedded JAR database work? Any help would be great. Thanks. Ryan -- Thomas Nielsen

Re: Derby database design issues

2007-08-03 Thread Thomas Nielsen
John C. Turnbull wrote: - the database engine *may* be able to precompile the stored procedure, and reuse that precompiled block at a later invocation of the stored procedure for a (very slight) performance gain. Impact depends on the nastyness of the expression and the engine itself. This is no

Re: Derby database design issues

2007-08-02 Thread Thomas Nielsen
I don't think so. But you might be able to do it anyway - grant access to the table(s) only to a "sqlproc" (or whatever) user, and then execute the stored procedure as that user? Cheers Thomas -- Thomas Nielsen

Re: AW: Shutdown Network Server w/ auth enabled

2007-07-25 Thread Thomas Nielsen
FYI: There's been some discussion about this issue on the derby-dev list lately. Thomas Kasper, Kay wrote: hi Ole, i have the same problem (derby version 10.2.2) and my opinion is, that the server has stopped, but should not have done that. it should have rejected the connection without a stop

Re: running ij commands from a code in c

2007-06-14 Thread Thomas Nielsen
Thomas Nielsen wrote: The idea is to do something similar to a java System.exec(), which you probably already know, but c-style. Runtime.exec() oh well... T -- Thomas Nielsen

Re: running ij commands from a code in c

2007-06-14 Thread Thomas Nielsen
rested in that: "fork a new process running ij". I virtually know nothing about that topic. Could you please give me some simple "HelloWorld" example on that? 2007/6/14, Thomas Nielsen <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>: yarono, If Tonys sugge

Re: running ij commands from a code in c

2007-06-14 Thread Thomas Nielsen
e functions (meaning create DB and shutdown) via the ij prompt, run my code to perform table creation, insertions, etc.. The shutdown and creation of the db's is done through the ij prompt, while the rest of my code is in c. I want the whole thing to be done in c. Thomas Nielsen - Sun

Re: running ij commands from a code in c

2007-06-13 Thread Thomas Nielsen - Sun Microsystems - Trondheim, Norway
ee is what you are looking for. Hope this helps :) Cheers, Thomas yarono wrote: Is there a way to run the 'ij commands' in my code (written in c), just as I execute SQL statements? -- Thomas Nielsen