How can a table scan return more rows than are in the table?
I have a complex query on a database with bad statistics and fragmented indices.  What I'm puzzled by is that when I examine an actual query plan I get 54 M rows from a table scan on a table that has 23 K rows.  Much further up the query plan this table is joined against itself (only 260 K rows out of 23 K).  How is this possible?

Running some other queries or rebuilding indices and statistics makes this go away, I'm just trying to understand why this would happen.

I have reproduced this with SQL 2005 and SQL 2008 R2 on a restore of the same database.
How can a table scan return more rows than are in the table?
===

I have a complex query on a database with bad statistics and fragmented indices.  What I'm puzzled by is that when I examine an actual query plan I get 54 M rows from a table scan on a table that has 23 K rows.  Much further up the query plan this table is joined against itself (only 260 K rows out of 23 K).  How is this possible?

Running some other queries or rebuilding indices and statistics makes this go away, I'm just trying to understand why this would happen.

I have reproduced this with SQL 2005 and SQL 2008 R2 on a restore of the same database.