Clodo <[EMAIL PROTECTED]> wrote:
-------------------------
CREATE TABLE test (
 Field01  text PRIMARY KEY NOT NULL,
 Field02  text
);

insert into test values ('alpha','beta');

update test set Field01='alpha', Field02='gamma';
-------------------------

In the "update" statement, i re-set the primary field "Field01" to a
value that field already have.
Sqlite detect this situation and don't update the primary index, or
suppose that developers optimize situation like that?

Your update statement is only valid when the table has no more than one record. Updating or not updating the index consisting of a single entry is unlikely to make a measurable difference. I don't think the optimizer goes out of its way to optimize a trivial special case like this.

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to