Re: [GENERAL] Using libpq, floats and binary data

2010-09-16 Thread Merlin Moncure
On Wed, Sep 15, 2010 at 6:52 PM, Arjen Nienhuis wrote: > On Thu, Sep 16, 2010 at 12:37 AM, Merlin Moncure wrote: >> On Wed, Sep 15, 2010 at 6:18 PM, Arjen Nienhuis >> wrote: >> > Hi, >> > Inserting many of rows is almost always IO bound. Converting ints and >> > floats >> > to text is CPU bound

Re: [GENERAL] Using libpq, floats and binary data

2010-09-15 Thread Arjen Nienhuis
On Thu, Sep 16, 2010 at 12:37 AM, Merlin Moncure wrote: > On Wed, Sep 15, 2010 at 6:18 PM, Arjen Nienhuis > wrote: > > Hi, > > Inserting many of rows is almost always IO bound. Converting ints and > floats > > to text is CPU bound and really fast anyway. To speed things up first > look > > at th

Re: [GENERAL] Using libpq, floats and binary data

2010-09-15 Thread Merlin Moncure
On Wed, Sep 15, 2010 at 6:18 PM, Arjen Nienhuis wrote: > Hi, > Inserting many of rows is almost always IO bound. Converting ints and floats > to text is CPU bound and really fast anyway. To speed things up first look > at things like indexes, how often you need to COMMIT or using COPY. Only > then

Re: [GENERAL] Using libpq, floats and binary data

2010-09-15 Thread Arjen Nienhuis
Hi, Inserting many of rows is almost always IO bound. Converting ints and floats to text is CPU bound and really fast anyway. To speed things up first look at things like indexes, how often you need to COMMIT or using COPY. Only then look at prepared statements and binary transfer modes. Else it's

Re: [GENERAL] Using libpq, floats and binary data

2010-09-15 Thread Merlin Moncure
zz On Wed, Sep 15, 2010 at 12:02 PM, Michael Hull wrote: > Hi Guys, > I have jsut started to use the libpq interface to postgre, and was > wondering if someone with some experience could explain the 'best > practices' :) > > I am preparing a query, then submitting it with binary data. 6 values >

[GENERAL] Using libpq, floats and binary data

2010-09-15 Thread Michael Hull
Hi Guys, I have jsut started to use the libpq interface to postgre, and was wondering if someone with some experience could explain the 'best practices' :) I am preparing a query, then submitting it with binary data. 6 values are ints, and one is a float. For the ints, I understand that since I n