Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1044209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:47:26+00:00 2026-05-16T15:47:26+00:00

I am given task to write a script (or better yet, a daemon), that

  • 0

I am given task to write a script (or better yet, a daemon), that has to do several things:

  1. Crawl most recent data from several input xml feeds. There are, like, 15-20 feeds for the time being, but I believe number might go up to 50 in future. Feed size varies between 500 KB and 5 MB (it most likely won’t go over 10 MB). Since feeds are not in a standardized format, there has to be a feed parser for each feed from given source, so that data is unified into single, common format.
  2. Store data into database, in such a way that every single unit of data that is extracted from feeds is still available.
  3. Since data changes over time (say, information is updated at least once per hour), it is necessary to keep archive of changed data.

One other thing that has proven to be difficult to manage in this case (I already hacked together some solution) is that during step 2 database begins to slow down to a crawl, because of volume of SQL queries that insert data in several tables, which affects rest of the system that relies on database (it’s a dedicated server with several sites hosted). And I couldn’t even get to step 3…

Any hints on how should I approach this problem? Caveats to pay attention to? Anything that would help me in solving this problem is more than welcome.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T15:47:27+00:00Added an answer on May 16, 2026 at 3:47 pm

    Some of my ideas:

    1. You can devise a clever way to use database transactions if your database supports transactions.
      I’ve only experimented with database transactions but they say it can increase insert speeds up to 40% (mysql.com) and it doesn’t lock tables.

    2. You can append data to a temp file, even in a sql friendly format and load data into your database at once.
      Using LOAD DATA INFILE is usually 20 times faster (mysql), I’ve used to quickly insert over a 1 million entries and it was pretty quick.

    3. Setup some kind of queing system.

    4. Put a sleep or wait on each query (in python, time.sleep(1) will make the process wait 1 second)

    I’m not exactly sure what db you’re using but here are some pointers in optimizing inserts:
    http://dev.mysql.com/doc/refman/5.0/en/insert-speed.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Simple task: given that an article has many comments, be able to display in
I was given a task to write an algorithm that finds the # of
I've been given the task of doing maintenance to a iOS application that uses
I was given a task. First dialog based application has 4 buttons (up, down,
I'm given a task to write a user authentication and login system in java.
I have been given a task to write a program to automatically create a
I want to write a PHP script which, given a URL, copies the whole
I've been given the task to write a plugin for Trac. It should provide
I am trying to write an awk script that can get a block that
I'm given a task to write an algorithm to compute the maximum two dimensional

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.