idx_analyser
Posted in 1994
I'm not sure if I ever posted this utility. I know I meant to but may have got wrapped up. Essentially it is a utility which scans your source code and based on that tries to indicate which columns in a table are good for indices and which are not so good by assigning them a score. I have found it useful, but am still not inclined to trust it exclusively and generally go out and check what it tells me by hand. Anyway - I discovered during one of these checks that it skips the keyword 'BETWEEN' in code as an indicator of an index. For those of you that I gave this to, or who have it, this can be correct by changing: Line 158 of idx_scansrc: # get only "=" lines, lose some basic stuff. grep "=" /tmp/idx_scan1 | grep -iv -e "let " -e "if " -e "for "> /tmp/idx_scan2 To: # get only "=" lines, lose some basic stuff. grep "=" /tmp/idx_scan1 | grep -iv -e "let " -e "if " -e "for "> /tmp/idx_scan2 grep -i "between" /tmp/idx_scan1 >> /tmp/idx_scan2 If I have not posted this in the past then holler at me. j. _____________________________________________________________________________ Jack Parker | If I wrote programs the way Hewlett Packard, BSMC Boise, Idaho, USA| politicians wrote laws. I'd jparker@hpbs3645.boi.hp.com | call it Windows, and make a fortune. _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________