On Mar 7, 2008, at 4:08 PM, Andrew Stromnov wrote:
> > Currently all sharded queries executed against every shard > sequentially. I have eight shards, and rather slow mysql servers. And > I want to implement parallel execution of this requests and combine > their answers together (аs in ShardedQuery). Is it possible? You'd have to open up ShardedQuery and modify it for your own purposes. If you browse the source you'll see that the whole shard.py module is about 80 lines of code and has minimal awareness of core SA internals, so it should be pretty straightforward to work with. Alternatively you could forego using shard.py altogether and just use distinct Session objects which execute in a similarly parallelized fashion. The few people I know of using SA in a clustered environment are just doing it that way, which is uglier within application code but keeps the reality of the server environment very explicit....fairly typical for a highly optimized system. If you are going with an 8-server horizontally scaled approach, which seems pretty aggressive performance-wise, its probably worth it to look into improving the efficiency of the actual database servers as well...MySQL is usually extremely fast with single-table queries. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---