-
SQL Tuning
I have table which has 12 Mill rows, when I try to query the database with below sql it is doing the full table scan.
Select * from abc_tbl where rec_stat='C'
This column “rec_stat” having the bit map index even thus it is doing full table scan. Any suggestions to avoid the full table scan.
Nallamothu
-
why are you assuming a full table is bad?
-
As a rule of thumb, if C represents more than ~4% of the table, then a tablescan is more efficient.
-
Originally Posted by davey23uk
why are you assuming a full table is bad?
Reason is it need to go thru the entire 13 mill rows right ? so i think it takes long time.
Nallamothu
-
-
Originally Posted by davey23uk
so why is that bad?
As Christopher R. Long said I have C records are more than 4 % of the table then i think i'm fine .let it run the full table scan.
Thank you all for your time.
Nallamothu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|