On Sep 4, 9:06 am, Iñaki Baz Castillo <[email protected]> wrote: > Summary: > > Sequel Sequel(prep. stament) DataMapper > > ruby1.8 cpu usage: 85% 65% 92% > mysqld cpu usage: 11% 30% 5% > ruby1.8 mem usage: 1.2% 1.3% 1.9% > mysqld mem usage: 2.3% 2.3% 2.3% > test time (seconds): 18.143 18.913 16.452 > > My opinions: > > - It seems that, without prepared staments, DataMapper is a bit faster > than Sequel > when performing the same query. > > - Without prepared staments, DataMapper consumes more CPU than Sequel but > makes > MySQL to consume less (I cannot understand why since the query is > exactly the same). > > - When using Sequel prepared staments, there are three SQL queries for > each request so > MySQL works more and has higher CPU usage. However, Ruby process seem > to consume much > less CPU. > > Sincerelly, I cannot get a conclussion from this benchmark, but > DataMapper seems a bit > faster. Anyhow DataMapper doesn't support prepared staments.
Thanks for the benchmarking, I haven't seen any Sequel vs. DataMapper comparative benchmarking before. It's good to know that using Sequel is only about 10% slower than DataMapper for a simple select of a single column attribute on a web page. There are various ways you can optimize the Sequel code. Generally, for something that's very performance sensitive, you are going to want to hard code the SQL. FWIW, your benchmark is close to the worse case scenario when it comes to Sequel performance. Sequel attempts to optimize for the case where you are selecting many records and attributes at once, since those are generally the more performance sensitive cases. Can you try benchmarking selecting all attributes of many complex records at once? For example, a select of 100 records which each have about 10 fields? Jeremy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
