[DB-SIG] SQL statement parse for Oracle

Keating, Tim TKeating@origin.ea.com
Fri, 14 Dec 2001 12:19:15 -0600


No condescension intended, it just seems to me that if the client starts
doing SQL parses and caching the results, you're shifting a chunk of
functionality from the server to the client. It's also way more client than
(IMHO) most people need, and the desired result (minimizing SQL parses) can
be achieved with an existing piece of functionality. 

I also suspect that this would be a lot harder to do than it sounds like on
paper.

TK

> -----Original Message-----
> From: Anthony Tuininga [mailto:anthony@computronix.com]
> Sent: Friday, December 14, 2001 12:02 PM
> To: Keating, Tim
> Cc: 'j.andrusaitis@konts.lv'; 'Python DB-SIG Mailing List'
> Subject: Re: [DB-SIG] SQL statement parse for Oracle
> 
> 
> Ok, that seems rather condescending.... Or it might just be 
> me..... :-)
> 
> The problem with creating a stored procedure is that you lose 
> complete 
> control. If you wanted to, for example, print something to stdout for 
> each row processed (or set of rows processed) you would not 
> be able to 
> do this.
> 
> Anthony
> 
> Keating, Tim wrote:
> 
> >This seems like engineering a solution for a non-existent 
> problem. You
> >can
> >achieve the same effect by simply making the statement a stored
> >procedure,
> >which every database programmer worth his salt knows how to do.
> >
> >Just my $0.02.
> >
> >TK
> >
> >>-----Original Message-----
> >>From: Jekabs Andrushaitis [mailto:j.andrusaitis@konts.lv]
> >>Sent: Friday, December 14, 2001 1:28 AM
> >>To: 'Python DB-SIG Mailing List'
> >>Subject: [DB-SIG] SQL statement parse for Oracle
> >>
> >>
> >>In the Oracle world SQL statement parsing can take 
> >>considerable CPU/Block IO
> >>for complex statements. Well, I am using pre-historic 
> Oracle DB module
> >>(looks like
> >>some OLD DCOracle to me:), however I did not see anything 
> >>related to this in
> >>DBAPI too.
> >>What I am talking about is API to allow to parse statement 
> >>for a cursor (for
> >>Oracle
> >>OCI it is done by 'oparse' calls) without executing it. It 
> >>could be used to
> >>speed
> >>up things in situation where same statement has to be 
> >>executed several times
> >>with different bind variables for example. Or when you want 
> >>application uses
> >>persistand DB connection and you can create several cursors for each
> >>operation
> >>you need to perform thus eliminating cost of parsing each 
> >>statement over and
> >>over
> >>again...
> >>
> >>From DB-API's point of view it could be Python methods for 
> >>cursor object:
> >>	dbc.parse('some statement here')
> >>	dbc.executeparsed([some bind variables here])
> >>
> >>This can be a very useful feature for DBAPI to have, since in 
> >>case of Oracle
> >>and
> >>complex statements executed many times it can make the 
> >>difference visible.
> >>
> >>I have made made these patches for my OLD OLD Oracle module 
> >>(sadly I have
> >>to stick with it for now cause of other patches weve made in 
> >>it - Python DB
> >>connection
> >>object creation from embedded SQL connections, various memory 
> >>leak fixes
> >>which
> >>were critical in the environment I am using this module etc:)...
> >>
> >>Maybe I am totally missing something about DBAPI spec, and if above
> >>described
> >>features do exist in the spec, then ignore this silly mail :)
> >>
> >>Also, I am not aware of RDBMS supporting parsing without 
> >>executing, but
> >>Oracle
> >>certainly is one of those :)
> >>
> >>Jekabs
> >>
> >>
> >>_______________________________________________
> >>DB-SIG maillist  -  DB-SIG@python.org
> >>http://mail.python.org/mailman/listinfo/db-sig
> >>
> >
> >_______________________________________________
> >DB-SIG maillist  -  DB-SIG@python.org
> >http://mail.python.org/mailman/listinfo/db-sig
> >
> 
>