On Tue, Nov 22, 2011 at 2:52 PM, Ciaran Archer <[email protected]> wrote:
> Hi there
>
> We've been evaluating the use of Sequel with SQL Server, and as poart
> of this we've been benchmarking Sequel against AR.
>
> We're using JRuby, and Torquebox as our application server for all
> tests. We are using Sinatra as our web framework and Apache Bench to
> run the tests. A SQL Server 2008 R2 instance is being used for the
> tests.
>
> Our benchmark test is very simple, return all rows in a table and
> print them to the standard output. The test table has 72 rows.
>
> AR BENCHMARK RESULTS
>
> Requests per second:    182.08 [#/sec] (mean)
> Time per request:       54.922 [ms] (mean)
>
> SEQUEL BENCHMARK RESULTS
>
> Requests per second:    8.72 [#/sec] (mean)
> Time per request:       1146.993 [ms] (mean)
>
> I've extracted the relevant Sequel code, here: https://gist.github.com/1385695

I would say the following line must be expensive:
dataset.filter("clientid > 0")

Why didn't you use all directly ?

>
> I am trying to understand why Sequel seems to be doing so poorly and
> I'm hoping someone can tell me where I might be introducing an issue,
> or where I might be able to improve things.

Where is the equivalent AR code ?

>
> Apologies in advance if the code is not super, I've only been using
> Ruby a few months :)
>

Well you already make use of modules...

-- 
Christian

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to