Cedric Cuche wrote:
> 
> Hi Alexander,
> Thanks for the explanation, but my large statement already 
> comes from a jdbc PreparedStatement like this one:
> PreparedStatement st = connection.prepareStatement("SELECT 
> mp.measuretime, mp.measurevalue FROM ch_runMeasuresOnWells 
> rmonw, ch_measurepoints mp WHERE
> rmonw.run_id = ? AND rmonw.device_id = ? AND rmonw.well_id = 
> ? AND rmonw.measure_type = ? AND rmonw.prog_id = ? AND 
> rmonw.application_id = ? AND 
> mp.application_id= rmonw.application_id AND mp.run_id = 
> rmonw.run_id AND mp.measure_type = rmonw.measure_type ORDER 
> BY mp.measuretime");
> 
> It works like a charme when "mp" do not have to many rows. 
> With lot of datas, an "SQL statement is too long. Increase 
> the DB parameter PACKET_SIZE." error is returned.
> 
> Will "st.executeBatch()" rather than "st.executeQuery()" help 
> really, as I only run one statement?
> Is it bad/no good practice to increase the PACKET_SIZE parameter?

It depends on the PACKET_SIZE you use now.
If you have 64KB it is no good practice to increase just for overcoming
that problem, but with 16KB current PACKET_SIZE it would be ok.
What is your current value for PACKET_SIZE?

But in your case (error occurs depending on the number of found rows, I understood)
increasing is no good practice. It should be found out what is going on and how
to restrict the number of data tried to fill in one packet.

> What disadvantages must I expect from an increased 
> PACKET_SIZE parameter?

More main memory needed per usertask (not only for increased packet,
but for some other internal structures, too, which are increased accordingly).

Elke
SAP Labs Berlin

> 
> Thank for your help
> 
> Cedric Cuche
> 
> -----Original Message-----
> From: Schroeder, Alexander [mailto:[EMAIL PROTECTED]
> Sent: lundi, 5. janvier 2004 13:54
> To: Cedric Cuche; [EMAIL PROTECTED]
> Subject: RE: PACKET_SIZE and jdbc
> 
> 
> Hello Cedric, 
> 
> _PACKET_SIZE is a database parameter, which can be set by DBM 
> GUI or with dbmcli command
> 
> param_startsession
> param_put _PACKET_SIZE <new value>
> param_checkall
> param_commitsession
> 
> BTW, you should look into your application where the large 
> statement comes from. Possibly a prepared statement, or an
> 'executeBatch' may suit your need more.
> 
> Alexander Schr�der
> SAP DB, SAP Labs Berlin 
> -----Original Message-----
> From: Cedric Cuche [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 05, 2004 1:18 PM
> To: [EMAIL PROTECTED]
> Subject: PACKET_SIZE and jdbc
> 
> 
> Hi, 
> I have a JSP page that create a Tab separted value file using 
> the datas from a db instance. 
> I got an error with big datasets (pair of DOUBLE PRECISION 
> and VARCHAR(255)): 
> javax.servlet.jsp.JspException: SQL statement is too long. 
> Increase the DB parameter PACKET_SIZE.
> 
> How do I set the PACKET_SIZE: 
> 1. In the installation script (like the create_demo_db.cmd) 
> 2. On a production instance 
> Is there any special settings to apply on the Jdbc driver? 
> Thanks for any help 
> Cedric Cuche
> 
> -- 
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe:    
http://lists.mysql.com/[EMAIL PROTECTED]

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to