Different count between "select * " and "select count(*) "
I ran this query on a view:
SELECT * FROM JAM_VIEW; -> returned 2154 rows.
SELECT COUNT(*) FROM JAM_VIEW; -> returned 171 rows.
Is it not weird? Any idea how could this is possible?
Maybe the records deleted from the base table during the interval which you ran both of your select statements.
Maybe you have a corrupt index that was used for the count(*)
Could you EXPLAIN PLAN for both and post the plans here? That would give a clue.
It could be a bug as well.
Did you execute both of the sql statements from same user id. If no it could be there are 2 tables of same name in different schema.
Click Here to Expand Forum to Full Width