Re: [Tutor] py-postgressql v1.0.1 question

2010-09-12 Thread Rance Hall
On Sun, Sep 12, 2010 at 4:54 PM, Luke Paireepinart wrote: >> >> Thanks for the tip.  I'll do some more research but this sounds promising. >> >> Rance >> > Just be aware that some methods of list building will iterate over the list > and evaluate it. So if you only want to retrieve the first 10 r

Re: [Tutor] py-postgressql v1.0.1 question

2010-09-12 Thread Luke Paireepinart
> > Thanks for the tip. I'll do some more research but this sounds promising. > > Rance > Just be aware that some methods of list building will iterate over the list and evaluate it. So if you only want to retrieve the first 10 results but you do something like Results = [I.fetch() for I in c

Re: [Tutor] py-postgressql v1.0.1 question

2010-09-12 Thread Rance Hall
On Sun, Sep 12, 2010 at 3:53 PM, Bill Allen wrote: > Rance, > > I was doing something similar, except I was querying an Oracle database, > using the cx_Oracle module.  I wanted the non-duplicated count of parts in > my database that met certain criteria.  All the output that met the criteria > of

Re: [Tutor] py-postgressql v1.0.1 question

2010-09-12 Thread Bill Allen
> >> Second question is more of a performance question: >> >> I don't suspect a "large" # of items in the to_do list, so I *think* >> that it would be better to just have one SQL statement and then loop >> through the results 10 times to get the first few records rather than >> having a seperate sq

Re: [Tutor] py-postgressql v1.0.1 question

2010-09-12 Thread Bill Allen
Rance, I was doing something similar, except I was querying an Oracle database, using the cx_Oracle module. I wanted the non-duplicated count of parts in my database that met certain criteria. All the output that met the criteria of the select statements is loaded into the cursor object. I then