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?
What disadvantages must I expect from an increased PACKET_SIZE parameter?

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]

Reply via email to