After CREATE INDEX
Posted in 2000
Topics: General Discussion
If I
CREATE INDEX table_ind ON tableA (col1, col2);
That means will index col1, col2 in tableA.
But after I index tableA, I do INSERT/UPDATE/DELETE rows
Will also index the col1, col2 in tableA for me? Or I have to
DROP INDEX and CREATE INDEX again?
--
Why we want to teach our babies to talk and walk,
then later we tell them "sit down!", "be quiet!" ?
Democracy is not a better way for a solution,
it is just another way to spread the blames.
--Raymond
Raymond Chui wrote:
>
> If I
>
> CREATE INDEX table_ind ON tableA (col1, col2);>
> That means will index col1, col2 in tableA.
> But after I index tableA, I do INSERT/UPDATE/DELETE rows
> Will also index the col1, col2 in tableA for me? Or I have to
> DROP INDEX and CREATE INDEX again?>
Any rows added to the table will also be indexed. The index won't
disappear; the only way to get rid of the index would be to:
DROP INDEX table_ind
--
John Carlson
Informix DBA
WHSmith USA
#include std_disclaimer.h /* These are my opinions, not my company's
opinion */
I may not be understanding the question correctly, but it sounds like
you are asking if the index you create is updated when you
insert/update/delete rows. If that is what you are asking, then, YES.
After you create an index, you don't need to drop it and create it again
just because you inserted a new row.
If you are seeing problems with your database slowing down after you
insert a lot of rows, try doing
UPDATE STATISTICS HIGH FOR TABLE tableA(col1, col2);
In article <392BDBCA.62D61F2C@noaa.gov>,
Raymond Chui <raymond.chui@noaa.gov> wrote:
> This is a multi-part message in MIME format.
> --------------A2D6615A7A4753966A3579C4
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> If I
>
> CREATE INDEX table_ind ON tableA (col1, col2);>
> That means will index col1, col2 in tableA.
> But after I index tableA, I do INSERT/UPDATE/DELETE rows
> Will also index the col1, col2 in tableA for me? Or I have to
> DROP INDEX and CREATE INDEX again?>
> --
> Why we want to teach our babies to talk and walk,
> then later we tell them "sit down!", "be quiet!" ?
>
> Democracy is not a better way for a solution,
> it is just another way to spread the blames.
>
> --Raymond
>
> --------------A2D6615A7A4753966A3579C4
> Content-Type: text/x-vcard; charset=us-ascii;
> name="raymond.chui.vcf"
> Content-Transfer-Encoding: 7bit
> Content-Description: Card for Raymond Chui
> Content-Disposition: attachment;
> filename="raymond.chui.vcf"
>
> begin:vcard
> n:Chui;Raymond
> tel;fax:(301)713-0963
> tel;home:ICQ #: 16722494
> tel;work:(301)713-0624 Ext. 168
> x-mozilla-html:TRUE
> url:http://members.xoom.com/rchui/
> org:NWS, NOAA
> version:2.1
> email;internet:Raymond.Chui@noaa.gov
> title:SA, DBA
> adr;quoted-printable:;;NOAA, NWS, Office of Hydrology, W/OH2=0D=0A1325
East-West Highway, Room 8112;Silver Spring;MD;20910-3283;U.S.A.
> x-mozilla-cpt:;30256
> fn:Raymond Chui
> end:vcard
>
> --------------A2D6615A7A4753966A3579C4--
>
>
--
# unrm /
ksh: unrm: not found
# man cpio
Sent via Deja.com http://www.deja.com/
Before you buy.