Qualcuno può spiegarmi perché esiste una notevole differenza di prestazioni tra MySQL e SQL Server per questa semplice istruzione select?MySQL vs SQL Server 2008 R2 prestazioni di query di selezione semplice
SELECT email from Users WHERE id=1
Attualmente il database ha una sola tabella con 3 utenti. Il tempo MySQL è in media 0.0003 mentre SQL Server è 0.05. È normale o il server MSSQL non è configurato correttamente?
EDIT:
Entrambe le tabelle hanno la stessa struttura, chiave primaria è impostata id
, tipo di motore è MySQL InnoDB.
Ho provato la query con WITH(NOLOCK)
ma il risultato è lo stesso.
I tavoli hanno una struttura simile? Entrambi hanno un indice (PRIMARY KEY) su 'id'? –
Sì, la struttura della tabella è la stessa, PK è impostato su 'id' – matino
Quale tipo di motore stai usando per la tabella MySQL? – Namphibian