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

Ask A Question

Stats

  • Questions 509k
  • Answers 510k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You need to specify the global-flag on your regular expression.… May 16, 2026 at 4:49 pm
  • Editorial Team
    Editorial Team added an answer The authentication worked in your first test (ssh git@server). If… May 16, 2026 at 4:49 pm
  • Editorial Team
    Editorial Team added an answer is this possible? No. same origin policy? Yes. May 16, 2026 at 4:49 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I've been given the following task: An external source will write a name, datetime
I try to write KSH script for processing a file consisting of name-value pairs,
i'm supposed to write code which when given a text file (source code) as
Task: For a given position in 2D array generate list of surrounding positions located
I was given task to generate random 80 byte keys and i have decided
I am a junior software engineer who've been given a task to take over
I'm a Java developer and I have a question about automating a task I've
I'm quite new to Perl development, and I'd like to perform a following task:
I don't quite understand the example given from the man find , can anyone
I'm trying to create a cron job that will send a weekly newsletter. I

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.