Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-25 Thread Bruce Momjian
Tom Lane wrote: > "Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > >> ... If that's > >> what we think we want, we'd better put it on the wish-list for 7.5. > > > If we had a Parse function, then we at phpPgAdmin could allow Reports to > > contain parameters, and detect as such, and then w

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-18 Thread Tom Lane
"Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: >> ... If that's >> what we think we want, we'd better put it on the wish-list for 7.5. > If we had a Parse function, then we at phpPgAdmin could allow Reports to > contain parameters, and detect as such, and then when they run their report, >

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-18 Thread Christopher Kings-Lynne
> > It might possibly make sense for a libpq routine that exposes Parse > > to actually do Parse followed by Describe Statement; that would allow > > it to give back (a) an indication of the number and types of parameters > > needed by the statement, and (b) an indication of the column set to be >

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-16 Thread Bruce Momjian
Added to TODO: * Allow PREPARE of cursors --- Tom Lane wrote: > Sean Chittenden <[EMAIL PROTECTED]> writes: > >> I'm beginning to think that was a serious omission. I'm tempted to > >> fix it, even though we're pa

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-16 Thread Bruce Momjian
Is there a TODO here? Text? --- Tom Lane wrote: > Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > > What do you actually get back from a Parse request? > > Nothing. If successful, it creates a prepared statement ins

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> I'm beginning to think that was a serious omission. I'm tempted to fix >> it, even though we're past feature freeze for 7.4. Comments? > Seems pretty well isolated. If you're tallying votes, count me as a "yay". Well, the early voting

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > On Tue, 12 Aug 2003, Tom Lane wrote: >> I'm beginning to think that was a serious omission. I'm tempted to fix >> it, even though we're past feature freeze for 7.4. Comments? > Can you give an example of this usage of this API? I am wondering whether >

Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > I wasn't interested in measuring the performance of yacc -- since I know > it is bad. It was a basic test which wasn't even meant to be real > world. It just seemed interesting that the numbers were three times slower > than other databases I ran it on. He

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Joe Conway
Tom Lane wrote: A Bind/Execute facility would need a pair of routines with signatures very similar to PQexecParams/PQsendQueryParams --- they'd take a prepared statement name instead of a query string, and they'd not need an array of parameter type OIDs, but otherwise the same. I couldn't come up

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Tom Lane
"Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: >> We could also think about providing an interface to do just Parse, >> although this is inessential since you can set up a prepared statement >> by PQexec'ing a PREPARE command. > Wait just a minute! phpPgAdmin would love to be able to 'pars

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Tom Lane
Stephen Frost <[EMAIL PROTECTED]> writes: > You probably know but I'll quickly outline it to point out the > differences, as I see them, from the 'COPY' ability. Basically the user > defines their own C structure and then malloc's an array of them. The > user then tells the database the type, off

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Sean Chittenden
> This leaves us with a bit of a problem, though, because there isn't > any libpq API that allows access to this speedup. I put in a > routine to support Parse/Bind/Execute so that people could use > out-of-line parameters for safety reasons --- but there's no > function to do Bind/Execute against

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Christopher Kings-Lynne
> > Wait just a minute! phpPgAdmin would love to be able to 'parse' arbitrary > > sql entered by the user to separate semi-coloned queries, identify various > > types of queries, etc. What would a Parse call allow us to do? > > Hm. I was about to say "very little that you can't do with a PREPARE

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: > Of course the obvious way of getting rid of the parser overhead is not > to parse everytime --- viz, to use prepared statements. I think this would be nice to have too... On a similar note (I think anyway) I wasn't able to find any functions for bulk dumps

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Tom Lane
Stephen Frost <[EMAIL PROTECTED]> writes: > ... If libpq grabs the entire result in one go then that may > actually cause a problem for me when I start to move things from Oracle > to postgres since the clients don't always have much memory available. It does that in an ordinary SELECT. The custo

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > What do you actually get back from a Parse request? Nothing. If successful, it creates a prepared statement inside the server. It might possibly make sense for a libpq routine that exposes Parse to actually do Parse followed by Describe State

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Christopher Kings-Lynne
> This leaves us with a bit of a problem, though, because there isn't any > libpq API that allows access to this speedup. I put in a routine to > support Parse/Bind/Execute so that people could use out-of-line > parameters for safety reasons --- but there's no function to do > Bind/Execute against

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Joe Conway
Tom Lane wrote: I'm beginning to think that was a serious omission. I'm tempted to fix it, even though we're past feature freeze for 7.4. Comments? Seems pretty well isolated. If you're tallying votes, count me as a "yay". Joe ---(end of broadcast)-

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Tom Lane
Sean Chittenden <[EMAIL PROTECTED]> writes: >> I'm beginning to think that was a serious omission. I'm tempted to >> fix it, even though we're past feature freeze for 7.4. Comments? > On a quasi-similar note (and unless I've missed how to do this), you > can't create a cursor from a prepared sta

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: > Stephen Frost <[EMAIL PROTECTED]> writes: > > You probably know but I'll quickly outline it to point out the > > differences, as I see them, from the 'COPY' ability. Basically the user > > defines their own C structure and then malloc's an array of them. Th

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Christopher Kings-Lynne
> We could also think about providing an interface to do just Parse, > although this is inessential since you can set up a prepared statement > by PQexec'ing a PREPARE command. Wait just a minute! phpPgAdmin would love to be able to 'parse' arbitrary sql entered by the user to separate semi-colon

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Alvaro Herrera Munoz
On Tue, Aug 12, 2003 at 03:36:07PM -0400, Tom Lane wrote: > This leaves us with a bit of a problem, though, because there isn't any > libpq API that allows access to this speedup. I put in a routine to > support Parse/Bind/Execute so that people could use out-of-line > parameters for safety reaso

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Gavin Sherry
On Tue, 12 Aug 2003, Tom Lane wrote: > This leaves us with a bit of a problem, though, because there isn't any > libpq API that allows access to this speedup. I put in a routine to > support Parse/Bind/Execute so that people could use out-of-line > parameters for safety reasons --- but there's no

Re: Parsing speed (was Re: [HACKERS] pgstats_initstats() cost)

2003-08-14 Thread Jon Jensen
On Tue, 12 Aug 2003, Tom Lane wrote: > I have just finished running some experiments that compared a series of > INSERTs issued via PQexec() versus preparing an INSERT command and then > issuing new-FE-protocol Bind and Execute commands against the prepared > statement. With a test case like the