Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Record edition management strategy needed

by Abigail-II (Bishop)
on Sep 08, 2003 at 15:54 UTC ( [id://289797]=note: print w/replies, xml ) Need Help??


in reply to Record edition management strategy needed

In general, to speed up the database side, you want to
  • Minimize the times you connect to the database. So, you cache connection.
  • Minimize the times you compile SQL statements. So, you use stored procedures.
  • Minimize the search time to the appropriate row(s). So, you use indices.
  • Minimize the need to disk access. So, you let the database use as much memory as possible for caching.
  • Minimize the number of pages involved. So, you keep your rows as small as possible, possibly using various tables instead of having many columns.
Your question is very general, and without knowing the database server, and the structure of the database, there's not much you can say. A method that's faster on one server, could be slower on another.

Not that any of this has anything to do with Perl.

Abigail

  • Comment on Re: Record edition management strategy needed

Replies are listed 'Best First'.
Re: Re: Record edition management strategy needed
by monsieur_champs (Curate) on Sep 08, 2003 at 17:27 UTC

    After anything else, thank you for your interest, abigail.
    Here is some more work on the same issue:

    • I'm using a legacy CGI environment, I don't have any ideas about how to maintain connection caching here.
    • I'm using MySQL (legacy, too), so I can't use stored procedures: there is no support for them here.
    • I'm currently using indexes and I'm sure that data is stored as closer to the third normal form as possible.
    • I'm very limited on the database server available memory. MySQL is doing the best it can on keeping data on memory.
    • My tables are legated, too, and I can't transform things that much (changing data structs don't worth the effort).

    The perl-related part is: without changing things at the database (this could break other applications that use the same data), I need to develop a strategy to control changes, and built a UPDATE SQL query to apply changes to the database, minimizing the data writen. If you know any modules that could be useful, or any strategy that I can implement, please let me know.

    Thank you very much for your attention.
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    monsieur_champs

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://289797]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-19 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found