> Out of curiosity, have you tried this approach with any relatively large
> dataset?
No, I'm gambling :)
Large meaning: table-scanning a table in excess of 1Gb.
By the way, most of the time, I use "limit to" clauses in Sql, and the
application asks the user to "page-previous/page-next" or else refine his
question to obtain a smaller number of hits.
> It seems like it would work pretty well in theory
I'm gambling ...
> (as long as you
> aren't the first person to run a query after startup...),
>
Yes, but then you have the system all for yourself. So, if you're the one
filling the entityContainer, you should have all cycles for yourself ...
Have you ever noticed that the very first query to Oracle or Sql Server are
slow as well?
> will it be better to re-execute the session bean with the new sort
predicate or to sort on the
> entity collection you already have?
Java implements a really decent sorting framework/algorithms. I would use
Java, if it's only a re-sort.
For the initial sort (unless there will be re-sorts) I would use Sql.
If you need to grab more primarykeys or throw away primarykeys, I wouldn't
keep these results and manually add/substract keys, unless it's really
simple to do. I would just have the db re-execute the query (without
carrying payload, however, because that's grabbed from the container).
> I'd assume the sql would generally be faster on the assumption that not
> every row would be in the object cache in a large system.
It all boils down to whether your rdbms has smarter caching strategies than
your ejbcontainer.
> But I'm also
> wondering if you could even write a comparator that would be as fast as a
> sql sort because you have to check minimally the sort fields plus some
sort
> of equals function for the object, where the database would only have to
> operate on the sort fields (and you could index and cache the popular
ones).
They're both feasible strategies. I'm afraid that you can only see the
difference when the load on the application is .
> "jBossKey" - you hit it and an imitation console window for whatever ejb
> server your management thinks you are using pops up! ;-)
>
Let's do it! :)
My management is actually rather my "customership" and it's a fixed price
project. If they don't like what I'm doing, they should ask someone else, I
guess. I trust that jBoss will not budge under the (normal) load for this
particular application. Will it scale up to extreme loads? Not this version,
but the technology, in the end, will.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]