indexing strategies 
Author Message
 indexing strategies

You could run the following query which will pull out the high cost sqls
running on your server.  Then start messing around with indexes and SET
EXPLAIN in dbaccess to see if you can optimize your queries.

database sysmaster;
select s.username,
          s.pid unix_pid,
          s.hostname,
          s.tty,
          q.sqx_estcost,
          q.sqx_estrows,
          q.sqx_sqlstatement
  from syssessions s,
           syssqexplain q
  where s.sid = q.sqx_sessionid
      and q.sqx_estcost > 500
  order by q.sqx_estcost desc;

OUTPUT:
username          jsmith
unix_pid           21506
hostname          florida1
tty               /dev/pts/3
sqx_estcost       1525
sqx_estrows      8
sqx_sqlstatement
select * from customer, orders
  where customer.customer_num = orders.customer_num
    and ship_date > "01/01/1976"

Note on the output: This is only one of several rows that will be returned.  
They will be in order from highest to lowest estimated cost.

_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://www.***.com/



Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Index strategy for a junction record

2. help with indexing strategy

3. Index strategy

4. Indexing Strategy

5. Indexing Strategy

6. Index Strategy for Link Table

7. Help with Indexing Strategy

8. Index strategy for a junction record

9. IQ - New Indexing Strategy for System 11?

10. INDEXING STRATEGIES

11. Indexing Strategy


 
Powered by phpBB® Forum Software