Home » SQL & PL/SQL » SQL & PL/SQL » How to Create Packages and Procedures to automatically drop table indexes
How to Create Packages and Procedures to automatically drop table indexes [message #604188] Thu, 26 December 2013 00:47 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

How to Create Packages and Procedures to automatically drop table indexes. Suggest me please or if have any documentation on this so, please send me.


Thank You
Re: How to Create Packages and Procedures to automatically drop table indexes [message #604189 is a reply to message #604188] Thu, 26 December 2013 00:51 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
WHY?
Re: How to Create Packages and Procedures to automatically drop table indexes [message #604190 is a reply to message #604189] Thu, 26 December 2013 00:55 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi BlackSwan,

I faced this question an interview , could you please suggest me & i don't know what is the process on this.

Thank You
Re: How to Create Packages and Procedures to automatically drop table indexes [message #604191 is a reply to message #604190] Thu, 26 December 2013 01:24 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

What does the question mean?

Re: How to Create Packages and Procedures to automatically drop table indexes [message #604192 is a reply to message #604188] Thu, 26 December 2013 01:28 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Michel Cadot,

My interviewer asked me on indexes , any examples please?

Thank You
Re: How to Create Packages and Procedures to automatically drop table indexes [message #604193 is a reply to message #604192] Thu, 26 December 2013 01:43 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Yes but what does mean the question?
If you don't understand the question how can you answer?
Re: How to Create Packages and Procedures to automatically drop table indexes [message #604194 is a reply to message #604193] Thu, 26 December 2013 01:45 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Michel,

How to Create Packages or Procedures to automatically drop table indexes.

Thank You
Re: How to Create Packages and Procedures to automatically drop table indexes [message #604195 is a reply to message #604194] Thu, 26 December 2013 01:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

As you want, I use notepad.

Re: How to Create Packages and Procedures to automatically drop table indexes [message #604196 is a reply to message #604195] Thu, 26 December 2013 01:48 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member

Quote:
As you want, I use notepad.



sorry i am not getting you.. Smile
Re: How to Create Packages and Procedures to automatically drop table indexes [message #604197 is a reply to message #604196] Thu, 26 December 2013 02:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You ask how to create package or procedure, the first is to write it and for this I use notepad.

When I ask what does mean the question, it is not a joke, you have to FIRST understand the question to be able to answer it. If you can't you are allowed to ask it to the interviewer, if you do it it is a good point, the interviewer sees you will first understand the job we'll ask to to do. If you don't and answer out of scope, it is a VERY bad point and the interviewer will know that hiring it will take the risk you will may lose time (and so money) to the enterprise and put the team leader (if not the whole) job in danger.

Re: How to Create Packages and Procedures to automatically drop table indexes [message #604198 is a reply to message #604188] Thu, 26 December 2013 02:03 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
You don't need a package or procedure to drop indexes. All you need is a DROP INDEX statement.
Re: How to Create Packages and Procedures to automatically drop table indexes [message #604199 is a reply to message #604197] Thu, 26 December 2013 02:07 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Michel Cadot ,

I am really sorry for this and just it is my doubt only.

Thank You

[Updated on: Thu, 26 December 2013 02:08]

Report message to a moderator

Re: How to Create Packages and Procedures to automatically drop table indexes [message #604201 is a reply to message #604199] Thu, 26 December 2013 02:36 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Sorry for what?
You asked a question whose actual root is "how can I succeed to this interview question?", I answered you, there is no problem. (at least for me).

Re: How to Create Packages and Procedures to automatically drop table indexes [message #604224 is a reply to message #604198] Thu, 26 December 2013 07:34 Go to previous message
Solomon Yakobson
Messages: 3273
Registered: January 2010
Location: Connecticut, USA
Senior Member
Lalit Kumar B wrote on Thu, 26 December 2013 03:03
All you need is a DROP INDEX statement.


You missed word "automatically". But this is not about DROP statement. Sometimes I also ask candidates same question. And many of them shoot right away: procedure will have table name & owner as parameters, will query DBA_INDEXES and drop table indexes using EXECUTE IMMEDIATE. While I am looking candidate to ask me a question what should procedure do if index is PK/UK supporting index? Should we leave it alone of drop constraint and all referencing FK constraints. That tells me candidate's level of understanding indexes: a) how would we distinguish PK/UK supporting indexes? b) will dropping PK/UK also drop the index? And yes, I am also looking for the candidate to question need for such procedure.

SY.
Previous Topic: get row counts of tables in schema without using dba_tables.num_rows
Next Topic: REGEXP
Goto Forum:
  


Current Time: Fri Apr 26 05:36:38 CDT 2024