Q
Problem solve Get help with specific problems with your technologies, process and projects.

Sorting records in database server vs. application server

Is it better to sort records in the database server or in the application server? In my case the database server and the application server are identical instruments. I have 40 million records in a table consisting of open, closed and suspended sales orders. I want to pull only the open orders by date. I have 10 indexes, none of which have both order type and date. Order type is my only choice. I will be pulling 4 million open records by order type of which 1 million will qualify. My choices are: I can pull all 4 million open orders in the application server with packet size and find my 1 million records using date. Second choice is I can use the where clause and get the records = open and date > the date I desire. In the second case I believe that I will get the 4 million records into the database memory, sort in the database memory and find my 1 million records by date. I still have to transfer the 1 million records to the application server by package size to eliminate paging. Putting in another index is not an option in this case. Which would you recommend and why?
It depends! It depends on your hardware configuration, and software. In your case, where DB server and app server are identical, I'd suggest that the DB is the place to do the operation. But I think this is a case of try it, and see which is faster.

Have you considered using parallel processing to get the information from the database? If it is a multiple processor, with mirroring or RAID, then this could boost performance considerably.
This was last published in June 2003

Dig Deeper on SAP application integration

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close