Re: Derby SQL ideas needed

2010-09-19 Thread Karl Wright
Yes. This is for the Max Activity and Max Bandwidth reports. Karl On Sun, Sep 19, 2010 at 2:13 PM, Alexey Serba wrote: > And all of this is only with single table repohistory, right? Is this > some kind of complex analytics/stats? > > On Sun, Sep 19, 2010 at 8:48 PM, Karl Wright wrote: >> Here

Re: Derby SQL ideas needed

2010-09-19 Thread Alexey Serba
And all of this is only with single table repohistory, right? Is this some kind of complex analytics/stats? On Sun, Sep 19, 2010 at 8:48 PM, Karl Wright wrote: > Here you go: > >    // The query we will generate here looks like this: >    // SELECT * >    //   FROM >    //     (SELECT DISTINCT ON

Re: Derby SQL ideas needed

2010-09-19 Thread Alexey Serba
You can also try ORDER BY bytecount DESC LIMIT 1 instead of aggregate function max, i.e. SELECT t1.bucket, t1.bytecount, t1.windowstart, t1.windowend FROM (xxx) t1 WHERE t1.bytecount=( SELECT t2.bytecount FROM (xxx) t2 WHERE t2.bucket = t1.bucket ORDER BY t2.bytecount DESC LIMIT 1 ) O

Re: Derby SQL ideas needed

2010-09-19 Thread Karl Wright
Looking at your proposal: SELECT bucket, primary_key, windowstart, etc FROM table AS t1 WHERE windowstart=( SELECT max(windowstart) FROM table AS t2 WHERE bucket = t1.bucket ) ... we'd be looking actually for something more like this: SELECT t1.bucket, t1.bytecount, t1.windowstart,

Re: Derby SQL ideas needed

2010-09-19 Thread Karl Wright
Here you go: // The query we will generate here looks like this: // SELECT * // FROM // (SELECT DISTINCT ON (idbucket) t3.bucket AS idbucket, t3.bytecount AS bytecount, // t3.windowstart AS starttime, t3.windowend AS endtime //FRO

Re: Derby SQL ideas needed

2010-09-19 Thread Alexey Serba
> The other thing is that we cannot afford to use the same "table" > twice, as it is actually an extremely expensive query in its own > right, with multiple joins, select distinct's, etc. under the covers. Even if you create indexes on bucket and activitycount columns? It might be that the query pl

Re: Derby SQL ideas needed

2010-09-19 Thread Karl Wright
"FIRST based on which sort?"? First based on the existing sort, which is crucial, because the sort is by bucket ASC, activitycount DESC. I'm looking for the row with the highest activitycount, per bucket. The other thing is that we cannot afford to use the same "table" twice, as it is actually a

Re: Derby SQL ideas needed

2010-09-19 Thread Alexey Serba
> SELECT DISTINCT ON (idbucket) t3.bucket AS idbucket, t3.activitycount AS > activitycount, t3.windowstart AS starttime, t3.windowend AS endtime FROM > (...) t3 Do you have primary key in your t3 table? > In Postgresql, what this does is to return the FIRST entire row matching each > distinct i

Re: Derby SQL ideas needed

2010-09-18 Thread Karl Wright
The Derby table-result function syntax requires all output columns to be declared as part of the function definition, and more importantly it does not seem to allow calls into Derby itself to get results. So this would not seem to be a viable option for that reason. Back to square 1, I guess. De

Re: Derby SQL ideas needed

2010-09-18 Thread Karl Wright
For what it's worth, defining a Derby function seems like the only way to do it. These seem to call arbitrary java that can accept a query as an argument and return a resultset as the result. But in order to write such a thing I will need the ability to call Derby at a java level, I think, rather

RE: Derby/JUnit bad interaction - any ideas?

2010-06-09 Thread karl.wright
From: ext Mark Miller [mailto:markrmil...@gmail.com] Sent: Wednesday, June 09, 2010 4:26 PM To: connectors-dev@incubator.apache.org Subject: Re: Derby/JUnit bad interaction - any ideas? On 6/8/10 6:35 AM, karl.wri...@nokia.com wrote: > I've been trying to get some basic tests w

Re: Derby/JUnit bad interaction - any ideas?

2010-06-09 Thread Mark Miller
On 6/8/10 6:35 AM, karl.wri...@nokia.com wrote: I've been trying to get some basic tests working under Junit. Unfortunately, I've run into a Derby problem which prevents these tests from working. What happens is this. Derby, when it creates a database, forces a number of directories within t

RE: Derby/JUnit bad interaction - any ideas?

2010-06-09 Thread karl.wright
t Karl (Nokia-S/Cambridge) Sent: Wednesday, June 09, 2010 5:24 AM To: connectors-dev@incubator.apache.org Subject: RE: Derby/JUnit bad interaction - any ideas? Open jdk does not seem to work properly with most java applications at this time, although it has continued to improve. Its switch in

RE: Derby/JUnit bad interaction - any ideas?

2010-06-09 Thread karl.wright
Olivier Bourgeat [olivier.bourg...@polyspot.com] Sent: Wednesday, June 09, 2010 4:03 AM To: connectors-dev@incubator.apache.org Subject: RE: Derby/JUnit bad interaction - any ideas? Debian Lenny have openjdk-6: http://packages.debian.org/fr/source/lenny/openjdk-6 Olivier Le mardi 08 juin 2010 à 22:37

RE: Derby/JUnit bad interaction - any ideas?

2010-06-09 Thread Olivier Bourgeat
; > Karl > > > -Original Message- > From: ext Jack Krupansky [mailto:jack.krupan...@lucidimagination.com] > Sent: Tuesday, June 08, 2010 4:36 PM > To: connectors-dev@incubator.apache.org > Subject: Re: Derby/JUnit bad interaction - any ideas? > > If we need to require Java 1.6

RE: Derby/JUnit bad interaction - any ideas?

2010-06-08 Thread karl.wright
MetaCarta is running Debian Lenny, which does not have a 1.6 version of Java available at this time. Karl -Original Message- From: ext Jack Krupansky [mailto:jack.krupan...@lucidimagination.com] Sent: Tuesday, June 08, 2010 4:36 PM To: connectors-dev@incubator.apache.org Subject: Re

Re: Derby/JUnit bad interaction - any ideas?

2010-06-08 Thread Jack Krupansky
If we need to require Java 1.6, that is probably okay. I am fine with that. Does anybody have a serious objection to requiring Java 1.6 for LCF? -- Jack Krupansky -- From: Sent: Tuesday, June 08, 2010 6:35 AM To: Subject: Derby/JUnit bad interac

RE: Derby/JUnit bad interaction - any ideas?

2010-06-08 Thread karl.wright
a strange mess. Still, things are currently working, so I guess I'll leave them as they are, for now. Karl -Original Message- From: ext Koji Sekiguchi [mailto:k...@r.email.ne.jp] Sent: Tuesday, June 08, 2010 10:30 AM To: connectors-dev@incubator.apache.org Subject: Re: Derby/J

Re: Derby/JUnit bad interaction - any ideas?

2010-06-08 Thread Koji Sekiguchi
(10/06/08 23:14), karl.wri...@nokia.com wrote: Yeah, I was pretty surprised too. But on windows it is likely that File.makeReadOnly() (which is what Derby must be using) doesn't actually do anything to directories, which would explain the discrepancy. Karl If so, luckily Ant hack can so

RE: Derby/JUnit bad interaction - any ideas?

2010-06-08 Thread karl.wright
l.com] Sent: Tuesday, June 08, 2010 9:45 AM To: connectors-dev@incubator.apache.org Subject: Re: Derby/JUnit bad interaction - any ideas? On 6/8/10 6:35 AM, karl.wri...@nokia.com wrote: > I've been trying to get some basic tests working under Junit. Unfortunately, > I've run into

RE: Derby/JUnit bad interaction - any ideas?

2010-06-08 Thread karl.wright
, 2010 10:08 AM To: connectors-dev@incubator.apache.org Subject: Re: Derby/JUnit bad interaction - any ideas? (10/06/08 22:35), karl.wri...@nokia.com wrote: > I've been trying to get some basic tests working under Junit. Unfortunately, > I've run into a Derby problem which prevents

Re: Derby/JUnit bad interaction - any ideas?

2010-06-08 Thread Koji Sekiguchi
(10/06/08 22:35), karl.wri...@nokia.com wrote: I've been trying to get some basic tests working under Junit. Unfortunately, I've run into a Derby problem which prevents these tests from working. What happens is this. Derby, when it creates a database, forces a number of directories within th

Re: Derby/JUnit bad interaction - any ideas?

2010-06-08 Thread Mark Miller
On 6/8/10 6:35 AM, karl.wri...@nokia.com wrote: I've been trying to get some basic tests working under Junit. Unfortunately, I've run into a Derby problem which prevents these tests from working. What happens is this. Derby, when it creates a database, forces a number of directories within t

RE: Derby

2010-06-04 Thread karl.wright
Yup. Karl -Original Message- From: ext Jack Krupansky [mailto:jack.krupan...@lucidimagination.com] Sent: Friday, June 04, 2010 12:27 AM To: connectors-dev@incubator.apache.org Subject: Re: Derby Just to be clear, the full sequence would be: 1) Start UI app. Agent process should not be

RE: Derby

2010-06-04 Thread karl.wright
@incubator.apache.org Subject: Re: Derby What is the nature of the single LCF process issue? Is it because the database is being used in single-user mode, or some other issue? Is it a permanent issue, or is there a solution or workaround anticipated at some stage. Thanks. -- Jack Krupansky

Re: Derby

2010-06-03 Thread Jack Krupansky
What is the nature of the single LCF process issue? Is it because the database is being used in single-user mode, or some other issue? Is it a permanent issue, or is there a solution or workaround anticipated at some stage. Thanks. -- Jack Krupansky --

Re: Derby

2010-06-03 Thread Jack Krupansky
e idle. 6) Possibly commit to Solr. 7) AgentStop. 8) Back to step 1 for additional jobs. Correct? -- Jack Krupansky -- From: Sent: Thursday, June 03, 2010 7:24 PM To: Subject: RE: Derby The daemon does not need to interact with the UI directly, onl

RE: Derby

2010-06-03 Thread karl.wright
: Thursday, June 03, 2010 5:51 PM To: connectors-dev@incubator.apache.org Subject: Re: Derby > (1) You can't run more than one LCF process at a time. That means you > need to either run the daemon or the crawler-ui web application, but you > can't run both at the same time. H

Re: Derby

2010-06-03 Thread Jack Krupansky
(1) You can't run more than one LCF process at a time. That means you need to either run the daemon or the crawler-ui web application, but you can't run both at the same time. How do you "Start" a crawl then if not in the web app which then starts the agent process crawling? Thanks for