MySQL Forums
Forum List  »  Italian

Ottimizzazione
Posted by: Franco Cecchini
Date: September 20, 2010 03:30AM

Salve,

Sto usando una semplice tabella con un campo sequence e un campo testo.
Sto usando questa tecnica per inserire un nuovo record a ottenere l'id in maniera sicura.

LOCK TABLES EXAMPLE WRITE
INSERT INTO EXAMPLE (text) VALLUES ('example')
SELECT MAX(id) FROM EXAMPLE
UNLOCK TABLES

In caso di traffico di inserimenti, le performance decadono molto di molto, anche 3 secondi per inserire un record.
Esiste un metodo migliore ?

Grazie

Options: ReplyQuote


Subject
Views
Written By
Posted
Ottimizzazione
2826
September 20, 2010 03:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.