Anything scriptable should be practical, assuming it doesn't take too much time to run the script. But you should only have to run the script when you boot up your machine, which is infrequent. It's just some config that says "put your tables in this directory (on the RAM disk) instead of the usual place".
Point taken regarding the SSDs, but RAM is still faster (perhaps not meaningfully so, unless your test suite is ridiculously large). On 23 March 2010 14:20, Ben Schwarz <[email protected]> wrote: > Doable, but not really practical for a development environment. > Most of the laptops used by the ruby community will be SSD in a year, right? > > > On 23/03/2010, at 2:15 PM, James Sadler wrote: > >> Another possibility would be to create a RAM disk setup for testing - >> that way you get proper database features but nice and fast access and >> tests. I am not sure how straightforward this is, but I'm confident >> that it's doable. >> >> On 23 March 2010 10:48, Simon Russell <[email protected]> wrote: >>> Hi there, my first post. >>> >>> The Mysql in-memory database is pretty basic; sort of like MyISAM, but >>> with even fewer features. To me it sort of defeats most of the >>> purposes of testing to test against a completely different database >>> engine (that doesn't even try to support the same features). I think >>> some time ago (somewhere else) there was mention of another database >>> engine that could do in-memory stuff, I can't remember what it is. >>> >>> On Tue, Mar 23, 2010 at 10:44, David Lee <[email protected]> >>> wrote: >>>> Last time i benchmarked it vs postgresql tuned for testing (no fsync, etc) >>>> PG came out on top on the suite i was running by a reasonable margin. If >>>> memory serves ... i think it was partly because sqlite is so crippled (no >>>> subselects, etc) it had to run (sometimes vastly) more queries to do the >>>> equivalent work. >>>> That was a couple years ago - if anyone has better datapoints throw them in >>>> ... >>>> Interesting to know mysql has the same feature, as it's less handicapped >>>> than sqlite. Maybe I'll try it out - I'm certain few of my current projects >>>> would work w/ sqlite, but should on mysql. >>>> >>>> On Tue, Mar 23, 2010 at 10:10 AM, Ben Schwarz <[email protected]> >>>> wrote: >>>>> >>>>> Has anyone in this thread tried using an in-memory database rather than >>>>> looking at using SSD or re-inventing machinist? >>>>> Both sqlite and mysql have in-memory databases or tables. I'm sure that >>>>> other rdbms implementations would also. >>>>> >>>>> I've used sqlite :memory: in the past when using datamapper and found it >>>>> to greatly increase the runtime speed for the testing environment. >>>>> Surely this would prove greater gains than re-thinking machinst? >>>>> >>>>> Of course, I don't want to get in the way of your hacking project. >>>>> >>>>> On 23/03/2010, at 10:06 AM, Pete Yandell wrote: >>>>> >>>>>> I like having an empty database for each test too, but I'd be more >>>>>> than willing to trade that for faster tests. >>>>>> >>>>>> If it's not solved before then, anyone fancy spending some time at >>>>>> Railscamp working on making this happen? >>>>>> >>>>>> - Pete >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Ruby or Rails Oceania" 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/rails-oceania?hl=en. >>>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google Groups >>>>> "Ruby or Rails Oceania" 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/rails-oceania?hl=en. >>>>> >>>> >>>> >>>> >>>> -- >>>> cheers, >>>> David Lee >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "Ruby or Rails Oceania" 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/rails-oceania?hl=en. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ruby or Rails Oceania" 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/rails-oceania?hl=en. >>> >>> >> >> >> >> -- >> James >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby or Rails Oceania" 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/rails-oceania?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" 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/rails-oceania?hl=en. > > -- James -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" 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/rails-oceania?hl=en.
