On Thursday, November 12, 2015 at 4:45:30 PM UTC-8, Mike Stucka wrote: > > Kind folks, > > I see in the documentation where sequel handles create table. I see where > it can handle sharding, where sharding is defined as spreading a database > across multiple servers. I see references to partitioning in the sense of > windows, which I gather is maybe something like a view. > > Is there any way to use sequel to partition/shard, as the terminology is > sometimes used within MySQL, to spread one table out on a single server? > > > https://dev.mysql.com/doc/refman/5.6/en/alter-table-partition-operations.html > > MySQL code would look something like > alter table mytable partition by range (myyear) (partition p1996 values > less than (1997), partition p1998 values less than (1999), ... partition > premainder values less than (2025); > > I've inherited a Ruby program that creates a single table of 19 million > rows, and it's much too unwieldy, and the partition plan would help with a > bunch of queries. >
Sequel doesn't have DSL support for that syntax, but you can also write your own ALTER TABLE statement and use Database#run to run it on the database. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
