On Sep 4, 11:39 am, Iñaki Baz Castillo <[email protected]> wrote: > El Viernes, 4 de Septiembre de 2009, Jeremy Evans escribió: > > > 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. > > With "hard code the SQL" do you mean "DB << QUERY"?
Well, in this case it would be: DB["SELECT `doc` FROM `storage` WHERE ((`doc_type` = ?) AND (`domain` = ?) AND (`username` = ?)) LIMIT 1", 2, 'example.org', 'alice'].first Database#<< is for executing code that doesn't return rows, such as CREATE TABLE statements. > > > 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? > > Ok, let me some days until I get some spare time for it. > > Thanks a lot. Thanks, I look forward to the results. 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 -~----------~----~----~----~------~----~------~--~---
