assymetry updating a boolean (=FALSE faster than =TRUE)
От | George Pavlov |
---|---|
Тема | assymetry updating a boolean (=FALSE faster than =TRUE) |
Дата | |
Msg-id | 8C5B026B51B6854CBE88121DBF097A861511D6@ehost010-33.exch010.intermedia.net обсуждение исходный текст |
Ответы |
Re: assymetry updating a boolean (=FALSE faster than =TRUE)
Re: assymetry updating a boolean (=FALSE faster than =TRUE) |
Список | pgsql-general |
Here is something that seems anomalous to me: when I set a boolean field to FALSE performance is much better than when I set it to TRUE. Any reason for FALSE to be favored over TRUE? Some details: vacuum analyze my_table; update my_table set is_foo=FALSE where some_id = 47; --142 rows affected, 8047 ms execution time. vacuum analyze my_table; update my_table set is_foo=TRUE where some_id = 47; --142 rows affected, 48609 ms execution time. I have run these kinds of queries repeatedly and the timing above is representative--the setting to FALSE case is about 6 times more performant. The table my_table has about 105K rows and has many other columns of various types. Thre is a trigger on the table, but it does not do anything special based on this column's value. The some_id column is indexed. This is on PG 8.1.3 on Linux. George
В списке pgsql-general по дате отправления: