I ran explain
command on this query:
EXPLAIN
Select * from project_project where id < 10 FOR UPDATE
And the plan output:
"LockRows (cost=0.00..6.57 rows=12 width=18305)"
" -> Seq Scan on project_project (cost=0.00..6.45 rows=12 width=18305)"
" Filter: (id < 10)"
How did the planner estimate rows=12
?
id
is a unique field?