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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure to handle single and/or multiple inserts

Status
Not open for further replies.

jwdcfdeveloper

Programmer
Mar 20, 2001
170
0
0
US
I am looking for a way to speed up a database transactions. I am using CFMX on the front end and an Oracle 9i db on the back end. Currently, I am using multiple loops to get the data I need in the format I want to populate one table. This is not very efficient and it's also pretty slow. I am looking for a way to throw the processing of the queries in a stored procedure or stored procedures. Here's what I need to do:

1. I need to be able to move products and their quantities from table a to table b by passing in two pieces of data: an order id and a customer id.

2. Table b stores more complex information than table a (For instance, table a stores product ids and quantities selected by a customer, while in table b I have to know the pack quantity of said product, unit price, and total cost of said product, the total pack quantity of products sold, etc.). Therefore, I have to perform intermediate calculations to get the data in the correct format.


3. The stored procedure(s) need(s) to be flexible enough to where I can add 1 item at a time, or be able to transfer data from table a to table b if a customer shops but has not logged into the system. The system currently holds data in one table for shopping purposes, and moves the data to another table when the customer is ready to purchase the products.

I am looking to handle the complexities of inserting and updating the data on the backend, because Cold Fusion (especially using loops) is handling this process too slowly. My concern is the shopping cart becoming frustrating to customers. I do not necessarily need code, but if someone has a concept or good step-by-step process on how to accomplish this task I would appreciate it.
 
Hi jwdcfdeveloper,

Can you give some more technical information about your problem e.g. how you are handling the job at present in Cold Fusion? The detailed code is not needed - high-level pseudocode is OK. Since the CF solution works (albeit slowly), it would be wise to take a look at how it works before advising you about the 9i backend solution.

Regards,

- ProblemSolver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top