Article View: uch.ing.dcc
Article #42Re: Pregunta JDBC (PreparedStatement)
From: Manuel Villarroel
Date: Mon, 30 Jan 2006 19:18
Date: Mon, 30 Jan 2006 19:18
24 lines
2173 bytes
2173 bytes
Gracias! "Rodolfo Toledo" <rtoledo@[dcc.uchile.cl|gmail.com]> escribi๏ฟฝ en el mensaje news:drll85$d6i$1@helcaraxe.dcc.uchile.cl... > Manuel Villarroel wrote: >> Estimados: >> [snip] >> Dado que el codigo entre los puntos suspensivos se ejecuta dentro de un ciclo,lo que quiero >> evitar >> es reemplazar, concatenar strings para generar una consulta, que mas encima se compilara cada >> vez. > > Lo de concatenar Strings en un ciclo es lo de menos si estas realizando una consulta a la base de > datos ya que los tiempos no son comparables. > > Ademas, si PreparedStatement soportara lo que quieres (yo diria que no), igual se compilaria la > consulta cada vez. > > Con respecto a una solucion, si son pocas tablas (ie. consultas distintas), puedes crear tantos > PreparedStatements como necesites. Asi evitas el que se compile una misma consulta mas de una > vez. > > Saludos, > Rodolfo Toledo.
Technical Details
Message-ID:
<drlov7$es8$1@helcaraxe.dcc.uchile.cl>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!news.cec.uchile.cl!helcaraxe.dcc.uchile.cl!not-for-mailReferences:
<drlkg4$csr$1@helcaraxe.dcc.uchile.cl> <drll85$d6i$1@helcaraxe.dcc.uchile.cl>Show Full Headers
Complete Article Headers
X-Google-Thread: faaa5,c949046c6148f2b0 X-Google-Thread: 1593cb,c949046c6148f2b0 X-Google-Attributes: gidfaaa5,gid1593cb,public X-Google-Language: SPANISH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!news.glorb.com!news.kjsl.com!news.nivel5.cl!news.cec.uchile.cl!helcaraxe.dcc.uchile.cl!not-for-mail From: "Manuel Villarroel" <someone@somewhere.com> Newsgroups: uch.ing.dcc,chile.comp.programacion Subject: Re: Pregunta JDBC (PreparedStatement) Date: Mon, 30 Jan 2006 16:18:39 -0300 Organization: DCC - Universidad de Chile Lines: 25 Message-ID: <drlov7$es8$1@helcaraxe.dcc.uchile.cl> References: <drlkg4$csr$1@helcaraxe.dcc.uchile.cl> <drll85$d6i$1@helcaraxe.dcc.uchile.cl> NNTP-Posting-Host: anakena.dcc.uchile.cl Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 8bit X-Trace: helcaraxe.dcc.uchile.cl 1138648871 15240 192.80.24.6 (30 Jan 2006 19:21:11 GMT) X-Complaints-To: newsmaster@dcc.uchile.cl NNTP-Posting-Date: Mon, 30 Jan 2006 19:21:11 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180