Hagamos que México crezca..

Prefiere el consumo de lo Hecho en México

Visitantes








Conversación

  • melvin: el mejor vpn es vpn ninja, su sitio es www.vpnnija.com  
  • effeselop: High-heeled shoes n your case, a jimmy choo nova nude slingback shoes girl that are how one prevent stop the terrible! The very thought of these disadvantages, high heel sandals after which it check out this new ladies, how suddenly it had not been so pretty! Pure while burden of check carefully the jimmy choo strappy sandals storage room, spring, summer, the fall and winter shoes, I only identify one pair a little high-heeled sandals, exclusion . Irrrve never worn high heel slides in one time, huh, huh! Today it is easy to understand shoe store favorite jimmy choo wedge women's high heel sandals, beautifully turned to that, believe that of to place it on, wind willow waist put a person unique on top of the swaying grace, the temptation fails to stop  
  • Samantha Santin: ola me pueden ayudar con lo basico para un examen de linux , estoy en 10 mo de basica , por favor , gracias  
  • alexandra: hola...tengo problemas para configurar las llamadas y crear los troncales....uso elastix 2.0.3 con asterisk 1.6...y soy nueva en esto..puedo relizar llamadas dentro de una misma oficina, pero no puedo sacarlas fuera, es decir locales e internacionales...necesito asesoria...gracias  
  • Fernando Hernández: Hey! Ya no estan disponibles los posts sobre facturación electrónica en México, podrías pasarme el tutorial o la clase en php? Por favoooor. Gracias  
  • daniel nuñez: buenas soy de venezuela y tengo una duda yo lo que quiero es hacer una iso debian que tenga todos los paquetes necesarios completos y programas como synaptis fortran java los pluging de video y sonido ya instalados osea que tenga todo lo necesario instalado pero sin que sea una instalacion con un cd netinst, es posible ?  
  • Cesar villegas: Buenas!!! oye no tienes programado algún curso?  
  • Urbano: Hola soy de Argentina.
    Desde hace un tiempo tengo instaldo Asterbilling SL y me parece un rpoyecto útil e interesante. Ahora me compré un AT 530 con la intension de pasar la tarifa al telefono pero seguramente algo estoy haciendo mal ya que despues de configurar el script con los datos del AMI; MySQL y ejecutar el comando que indica el manual.. no pasa nada, todo sigue igual y no se muestra la tarifa en la pantalla del telefono. Tal vez deba configurar algo tambien en el telefono.. la verdad no se, es que tampoco soy un experto en la materia. Les dejo algunos datos que talvez sean utilespara que me puedan ayudar: Tengo Elastíx 2.0.3 con Asterisk 1.6; FreePBX 2.7.0.3; A2Billing 1.8.1; Astercc 1.4 y Asterbilling SL. Espero que me puedan ayudar; desde ya muchas gracias.  
  • kike: Oye filein.. necesito una cotización de unas FxO para analógicas porfa..
    saludos  
  • cristy: hola por favor tengo problemas para conectar agi con asterisk me sale un error de broken pipe, sabes de que se trata???  

Escribe el código Captcha que estás viendo

by Robert Simpson.. " rel="bookmark">"The Importance of Transactions" by Robert Simpson..

Un interesante Post de Robert Simpson desarrollador del Ado Net Provider para SQLite y Visual Studio .NET 2005, dónde explica el porqué usar transacciones es importante, la principal a mi gusto es que disminuye considerablemente el tiempo de ejecución de las consultas, ya anotada en la lista de mis mejores prácticas.. La información fué tomada de la siguiente URL http://petesbloggerama.blogspot.com/2007/02/sqlite-adonet-prepared-statements.html
If you are inserting data in SQLite without first starting a
transaction: DO NOT PASS GO! Call BeginTransaction() right now, and
finish with Commit()! If you think I'm kidding, think again. SQLite's A.C.I.D. design means that every single time you insert any data
outside a transaction, an implicit transaction is constructed, the
insert made, and the transaction destructed. EVERY TIME. If you're
wondering why in the world your inserts are taking 100x longer than you
think they should, look no further.

Prepared Statements
Lets have a quick look at the following code and evaluate its performance:

</em></em>
using (SQLiteCommand mycommand = new SQLiteCommand(myconnection))
{
int n;
for (n = 0; n < 100000; n ++)
{
mycommand.CommandText = String.Format("INSERT INTO [MyTable] ([MyId]) VALUES({0})", n + 1);
mycommand.ExecuteNonQuery();
}
}
<em><em>

This code seems pretty tight, but if you think it performs well, you're dead wrong. Here's what's wrong with it:
I didn't start a transaction first! This insert is dog slow!
The
CLR is calling "new" implicitly 100,000 times because I am formatting a
string in the loop for every insert Since SQLite precompiles SQL
statements, the engine is constructing and deconstructing 100,000 SQL
statements and allocating/deallocating their memory All this
construction and destruction is involving about 300,000 more native to
managed interop calls than an optimized insert.
So lets rewrite that code slightly:


 
</em></em>
using (SQLiteTransaction mytransaction = myconnection.BeginTransaction())
{
using (SQLiteCommand mycommand = new SQLiteCommand(myconnection))
{
SQLiteParameter myparam = new SQLiteParameter();
int n;
mycommand.CommandText = "INSERT INTO [MyTable] ([MyId]) VALUES(?)";
mycommand.Parameters.Add(myparam);
for (n = 0; n < 100000; n ++)
{
myparam.Value = n + 1;
mycommand.ExecuteNonQuery();
}
}
mytransaction.Commit();
}<em>   </em><em><em>   </em><em>
Now
this is a blazing fast insert for any database engine, not just SQLite.
The SQL statement is prepared one time -- on the first call to
ExecuteNonQuery(). Once prepared, it never needs re-evaluating.
Furthermore, we're allocating no memory in the loop and doing a very
minimal number of interop transitions. Surround the entire thing with a
transaction, and the performance of this insert is so far and away
faster than the original that it merits a hands-on-the-hips pirate-like
laugh.



Every database engine worth its salt utilizes prepared
statements. If you're not coding for this, you're not writing optimized
SQL, and that's the bottom line.

 

 
 

Many developers do not
fully understand the importance of using prepared statements with
parameters where stored procedures (the preferred method in almost all
cases) cannot or should not be used. The importance of this, combined
with the practice of wrapping repeating inserts or updates in a
transaction, cannot be underestimated. If the above all makes sense,
then you'll like my next installment, "Did Chuck Norris kill SOA?". 
 
 

Dejar un comentario

by Robert Simpson.. " type="text" />

Escribe el código Captcha que estás viendo

Fuentes XML de comentario: RSS | Atom

Emblemas

Energizado por Jaws Project
Soporta RSS2
Energizado por Software Libre
Energizado por Mozila Firefox
Energizado por Ubuntu Linux
Energizado por PHP
Energizado por Apache Web Server
Energizado por MySQL
Energizado por SQLite
atom

¿ Where The Hell Am I ?

Mi Flickr







Aquí Mis Mejores Fotos

Eventos

Encuesta

¿Que medio de comunicación usas más ?

Comentarios Recientes