I've spent the last couple of weeks learning how to optimize the search tool we built. The short story is that we're now using a pass-through query in Access to pass parameters to stored procedures on SQL Server. Processing time has gone from about 2 minutes to less than 2 seconds.
Now that I know how to work with stored procedures, I'm thinking of how else to implement them with other types of applications.
BACKGROUND
The company has clients spread across multiple databases for various reasons; namely specific business rules (e.g., worker's comp rate, state tax rate, unemployment insurance, etc.) apply across an entire database.
Quite often someone in the company receives paperwork from an agency or client with nothing but the client employee's name or their SSN. Searching for this employee has been trial and error, going through each database at a time. Also, in many cases the person in our company just needs to see some basic information about the employee. For example, during tax season we just needed to verify a client employee's address and phone number. Hence the reason for such a tool.
We had initially designed the tool to have individual pass-through SELECT queries, uniting and applying criteria to them in Access. It was the uniting and applying criteria that has been slowing things down.
OPTIMIZING
So, I created two stored procedures with parameters: one that searches for an SSN one one that searches on a name. Each stored procedure unites the individual SELECT queries on a database separate from the other 12 that were being searched.
In VBA code, based on which criteria the user enters, we determine which stored procedure to run. We create a pass-through query to EXECUTE the stored procedure. This pass-through query then contains the search results, which is what we had with the earlier version of the tool.
PREVENTING SQL INJECTION
While reading the literature, I came across the concept of SQL injection and the need to prevent it. Since users are passing text to a SQL statment, we need to prevent the intentional or unintentional insertion of code that would prematurely terminate a text string and append a new command.
I wrote one procedure that scans what users enter in the first and last name fields for "--", "CREATE", and other such items. My coworker gave me some code to prevent users from entering other illegal characters. This double-barreled approach will prevent any SQL injection from occurring.
COMMUNICATING WITH THE MASSES
I enjoyed sharing the news of the updated tool with the rest of the company. I knew many had not even heard of it. I constructed the email the way I would a friendly blog post, including pictures.
One user immediately replied: "Awesome! Works very fast. Good job." I was contacted by two people in Accounting and Payroll who asked that I put the tool on their machines as well.
Much joy all around, I tell you. And IT looks good.
----------------
Now playing: Tim Hawkins - KidsRock
via FoxyTunes
Welcome to my online portfolio, the complement/substitute for my resume. The opinions included herein are my own and do not reflect those of any client or employer, past or present. Please check out the new site: http://danieljohnsonjr.com
- 401(k) report (7)
- accounting (1)
- administrivia (11)
- ADO (1)
- announcements (6)
- audio (1)
- batch files (1)
- benefits audit (2)
- blogging (8)
- branding (7)
- bridge application (17)
- business intelligence (7)
- cincinnati (6)
- client relations (4)
- community (1)
- competitive intelligence (2)
- conference (3)
- conversions (2)
- dashboard (3)
- data warehousing (1)
- design (4)
- documentation (2)
- financial reporting application (3)
- first post (1)
- get that job blog (2)
- global consumer products company (3)
- idea generation (2)
- integration manager (2)
- jazzmania productions (1)
- lessons learned (3)
- meetup (9)
- mentoring (3)
- microsoft great plains (5)
- music (2)
- nafta (1)
- networking (2)
- new media (22)
- payroll (6)
- peo (33)
- podcamp (3)
- podcampohio (2)
- podcasting (8)
- presentation (1)
- programming (31)
- public relations (1)
- public speaking (1)
- questions (1)
- requirements (4)
- search tool (3)
- social media networks (7)
- SQL (9)
- testing (1)
- training (1)
- troubleshooting (7)
- trucking (2)
- twitter (9)
- uml (1)
- VB.NET (2)
- VBA (1)
- wikis (1)
Wednesday, August 22, 2007
Server-side processing rocks the house!
Posted by Daniel at 2:36 PM 0 comments
Topics: client relations, design, peo, search tool, SQL
Monday, August 13, 2007
How do you draw the line between effective promotion and spam?
This is a question I've asked my LinkedIn network, and I also ask here:
How do you draw the line between effective promotion and spam?Comments are open and genuinely appreciated!
When marketing a brand or doing some other type of publicity for someone or something, there are effective ways to promote, and there are not so effective ways. How do identify, especially in the digital age in which we live, where the line between effective promotion (self- or otherwise) is and where you've crossed it?
Related tags: getthatjob get+that+job job+hunt job+search career+advice networking professional+development daniel+johnson+jr self+branding
crossposted to http://getthatjob.blogspot.com
Posted by Daniel at 9:22 AM 0 comments
Topics: branding, get that job blog, idea generation
Thursday, August 9, 2007
JIMM 90 - Crazy Busy Sticky Hot
Listener feedback about past episodes and such. Police and ER visits, Twitter tools, AMP, the upcoming One Voice Walk. Music with a country feel. 2-year anniversary in podcasting coming up this month. Other warm, juicy goodness.
Head over to the Journey Inside My Mind Podcast to listen and read more.
Related tags: journey+inside+my+mind journeyinsidemymind jimm daniel+johnson+jr
Posted by Daniel at 9:58 PM 0 comments
Topics: podcasting