Re: Selecting a few rows is really slow when ordering by primary key

2012-02-02 Thread Kristian Waagan
On 01.02.2012 14:51, Rick Hillegas wrote: Hi Simon, Glad to hear that regenerating the statistics fixed your problem. More inline... On 2/1/12 4:07 AM, Simon Chatelain wrote: ... But one small question remains, do you think that it is enough to run SYSCS_UPDATE_STATIS TICS only once, or

Re: Selecting a few rows is really slow when ordering by primary key

2012-02-02 Thread Kristian Waagan
On 02.02.2012 11:14, Kristian Waagan wrote: On 01.02.2012 14:51, Rick Hillegas wrote: snip On 2/1/12 4:07 AM, Simon Chatelain wrote: snip You may want to set derby.storage.indexStats.log=true, and more importantly, derby.storage.indexStats.debug.trace=true. Run you app for a while, then

Porting to standard SQL

2012-02-02 Thread TXVanguard
I am working on a project to port SQL code written for Microsoft Access to SQL code that works in JavaDB. The following SQL statement works in Access: UPDATE T1 INNER JOIN T2 ON (T1.A= T2.A) SET T2.B = T1.B but when I try it in JavaDB, I get the following error: Error code -1, SQL state

Re: Porting to standard SQL

2012-02-02 Thread Bryan Pendleton
On 02/02/2012 02:53 PM, TXVanguard wrote: UPDATE T1 INNER JOIN T2 ON (T1.A= T2.A) SET T2.B = T1.B Perhaps something like: update t2 set b = (select b from t1 where t1.a = t2.a) thanks, bryan