0

I have a database with almost 600 million records. I want to perform search directly by uploading excel file, so when I upload excel file, it should start searching in background, and showing status as 'In Progress' once it is complete its the process should stop and give message as 'Completed'

I can write code for uploading file xls file and search through normal way, but how to WRITE using BACKGROUND WORKER in asynchronous mode using asp.net C#.

I would be uploading excel file with 50,00 record to perform search from 600 million records in database.

1 Answer 1

0

Define your requirements

  • what is a typical time the search will require
  • how many results such search might lead (50K? 600M?)
  • you don't want to show them all on the result page, isn't it?

Depends on requirements there are few ways you can go, e.g.

  • set up a DB or MSMQ to which you would log a request. Your web app could then monitor the status of the request to subsequently notify the user of it's completion.
  • Asynchronous Pages

I would opt for my the suggestion and

  1. upload file/log request in to the database
  2. setup db job which will proceed the request and log all results into a table
  3. do not wait until search is finished but call an ajax that checks result table

Similar topic has been discussed as a part of other questions: Long-running code within asp.net process, BackgroundWorker thread in ASP.NET

Sign up to request clarification or add additional context in comments.

2 Comments

Typical time required to search should be less than 3 minute. if I upload 1 lakh record from excel file, it search result will have same amount of record, if record matches it will print value of its next column if not matches, it will simply 'print not found' I want result to be in form of excel download. Ideally how I want is Step1: I uploaded file with 1 Lakh record, it should start searching in database Step2: if record found, it will take the value of its next column, else add 'not found to the next column Step3: Once search is complete, the result should get downloaded into csv format.
Consider the way I suggest above. 3 min + time for upload is a long long-running process and needs to be handled by a Windows/DB service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.