Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Query Logging

Status
Not open for further replies.

tbg130

Programmer
Aug 11, 2004
46
CA
Hi All,

I have found a UDF that has helped me compare a value to a regular expression that is stored in SQL however, it seems to take forever when processing multiple records. I'm wondering if there is a way to log the action of the queries so I can understand what is actually happening in the back end.

The Regular Expression in the database represents an IP address range and I'm comparing those to an actual IP address. Just wondering how it loops through the Regular Expressions (if it loops at all; maybe it identifies match / no match immediately).

All in all, can I log the actions of the Queries to learn why it takes so long?

Thanks.
 
It is stored procedure , to troubleshoot you can create a log table with iterationid identity column and insert the intermediate results to study
 
Sorry for my ignorance; I'm not much a programmer. Is that a couple lines of code that I would add to the UDF/Procedure?

Just would like to output the log to a .txt file...

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top