Re: Factory pattern again

2007-07-27 Thread Steve Holden
[EMAIL PROTECTED] wrote: > first you need find the bottleneck of your script db or function > if the bottleneck is db > 1. which db do you use do you optimize the db from read > 2. the sql you write do not use any index "maybe select code, type > from products where type = 'I' or type = 'S' will he

Re: Factory pattern again

2007-07-27 Thread [EMAIL PROTECTED]
first you need find the bottleneck of your script db or function if the bottleneck is db 1. which db do you use do you optimize the db from read 2. the sql you write do not use any index "maybe select code, type from products where type = 'I' or type = 'S' will help" and you need create index on ty

Re: Factory pattern again

2007-07-27 Thread Steve Holden
Mike Howarth wrote: > Having overcome my first hurdle with the factory pattern, I've now hit > another stumbling block > > At the moment I'm trying to return around 2000 records from a db and load up > the relevant product object, what I've found is this is running extremely > slowly (> 20mins), t

Re: Factory pattern again

2007-07-27 Thread Mike Howarth
Having overcome my first hurdle with the factory pattern, I've now hit another stumbling block At the moment I'm trying to return around 2000 records from a db and load up the relevant product object, what I've found is this is running extremely slowly (> 20mins), the db is normalized and indexes

Re: Factory pattern again

2007-07-27 Thread Mike Howarth
Thanks that makes absolute sense. I was sure it was something simple, thanks for your time. Bruno Desthuilliers-5 wrote: > > Mike Howarth a écrit : >> Hi >> >> I was wondering whether anyone could help me, I'm pretty new to python >> coming from a PHP background and I'm having a few product

Re: Factory pattern again

2007-07-27 Thread Bruno Desthuilliers
Mike Howarth a écrit : > Hi > > I was wondering whether anyone could help me, I'm pretty new to python > coming from a PHP background and I'm having a few products in getting my > head round how to write the factory pattern within python. > > I'm currently looking to try to return values from a