Is it the norm for a query like:
update A set TextField = 'U'
to take 2 minutes to execute on a table with 2M records? The table has no PK, no indexes, but I’m not using where either.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
2M records updated in 2 minutes, that’s around 16k updates per second, which IMO is quite decent.
Most DBMS won’t just return when they committed the write operation to cache, but wait until the OS confirms that the write operation was in fact carried out. That feature is quite important to ensure data integrity, which you’ll agree with me is a critical quality of a db server. In contrast,
selectstatement can often be served from cache.By the way, you may find this presentation by Bruce Momjian interesting, it explains nicely what to think about when you select a DB server. It’s PostgreSQL centric, but what he explains is valid for all makes of database servers.
EDIT: and another interesting source of info is this presentation by Microsoft’s Bob Dorr – which among other interesting things states that 98% of IO in SQLServer is async.
Wrt your observation that updating a column that already contains a value vs one that was set to null, this SO article may contain useful info – the data type you used for your
TextFieldcolumn probably has a significant influence.