Re: Query to find indexes for a specific table
Posted in 1997
On 20 Nov 97 at 0:35, Jerry Gitomer wrote: > > > Is there a query I can set up that will permit our computer > > operators to determine if an index exits on a table? Why not create an executable script (chk_idx) like: #!/usr/bin/ksh for i in $* do stat= stat=`echo "info status for $i" | isql tracsy - 2>&1 >/dev/null` ( if [ -n "$stat" ]; then echo echo "Table $i not found." echo else echo echo "I N D E X E S F O R T A B L E $i" echo "info indexes for $i;" | isql tracsy - fi ) | pg done Then you could check the four tables by typing "chk_idx tab1 tab2 tab3 tab4" -- _____________________________________________________________________ | Colin McGrath cmm@trac3000.ueci.com | | Raytheon Engineers & Constructors, Inc. (215) 422-4144 | | Phila, PA, USA Standard Disclaimers Apply | |___________________________________________________________________|