Re: Optimize A Simple Query -- Help
Posted in 1996
Chao Y. Din wrote:
>
> I have a simple select count statement that takes three minutes to
> execute, yet I only have about 300,0000 rows. Here is the SQL.
>
> SELECT COUNT(*) FROM table WHERE key[1,7] = "B02800A" AND col1 = 2010
> AND col2 = 10;> [SNIP]
> Is it possible to force the query to use index on key without dropping
> the composite index?
>
> Thanks in advance.
>
> Chao
Hi Chao !
Try one of the following to solve your problem:
set indexes index_name disabled
set indexes for table_name disabled
Hope this helps !
Tschuess,
Dirk
--
---------------------------------------------------
Dirk Schmidtpott S I E M E N S
EMail: schmidtpott.pad@sni.de =============
Phone: 0049-5251-8-14922 N I X D O R F
Fax : 0049-5251-8-27905
The above statements and opinions are my own and do
not necessarily represent those of my employer.
---------------------------------------------------