Nice work getting to the bottom of this.

Sent from my iPad

On 9 Aug 2011, at 17:39, Shoeb Bhinderwala <shoeb.bhinderw...@gmail.com> wrote:

> Hi Sean –
>
> With these options added the Clojure code runs just about as fast as
> Java. I set the fetch size to 1000 for both of them.
>
> Average run times to load 69,000 records:
>
>  Java = 2.67 seconds
>  Clojure = 2.72 seconds
>
> Thanks
> Shoeb
>
>
> On Aug 9, 12:54 am, Sean Corfield <seancorfi...@gmail.com> wrote:
>> On Mon, Aug 8, 2011 at 5:12 PM, Dmitry Gutov <raa...@gmail.com> wrote:
>>> Like the doc says, `with-query-results` takes additional options
>>> before the query string.
>>
>> Yup, this is a recent enhancement. You can either pass a  PreparedStatement
>> that you've built and configured instead of a SQL string or you can pass any
>> of the following options in a map as the first element of the vector, ahead
>> of the SQL string:
>>
>>      :return-keys true | false - default false
>>      :result-type :forward-only | :scroll-insensitive | :scroll-sensitive
>>      :concurrency :read-only | :updatable
>>      :fetch-size n
>>      :max-rows n"
>>
>> So {:result-type :forward-only :fetch-size 1000} in the vector before your
>> SQL string should provide the same optimization as in the Java code. Please
>> let us know the results of your next test with those options added.
>> --
>> Sean A Corfield -- (904) 302-SEAN
>> An Architect's View --http://corfield.org/
>> World Singles, LLC. --http://worldsingles.com/
>> Railo Technologies, Inc. --http://www.getrailo.com/
>>
>> "Perfection is the enemy of the good."
>> -- Gustave Flaubert, French realist novelist (1821-1880)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to