473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Pickle or Mysql

Can I use Pickle to store about 500,000 key value pairs.. or should I
use mySql. Which one is best for performance, as the key value pair
increases.

Thanks

Apr 1 '06 #1
6 2574
am******@gmail.com writes:
Can I use Pickle to store about 500,000 key value pairs.. or should I
use mySql. Which one is best for performance, as the key value pair
increases.


That's an awfully large pickle. Maybe you want shelve. If there
are frequent updates, multiple clients, etc., then yes, use a database
like mysql.
Apr 1 '06 #2
So, Is Shelve a perfect solution (besides Mysql), to store large
key/value pairs, and which are updated frequently by multiple clients.

Thanks

Paul Rubin wrote:
am******@gmail.com writes:
Can I use Pickle to store about 500,000 key value pairs.. or should I
use mySql. Which one is best for performance, as the key value pair
increases.


That's an awfully large pickle. Maybe you want shelve. If there
are frequent updates, multiple clients, etc., then yes, use a database
like mysql.


Apr 1 '06 #3
am******@gmail.com writes:
So, Is Shelve a perfect solution (besides Mysql), to store large
key/value pairs, and which are updated frequently by multiple clients.


No, shelve is for use within a single process. With multiple clients
and frequent updates, you need a real database and some knowledge
about how to use one.
Apr 1 '06 #4
am******@gmail.com:
Can I use Pickle to store about 500,000 key value pairs..
Performance would be horrible. Use a BTree in ZODB instead:
http://www.zope.org/Wikis/ZODB/guide...00000000000000
or should I use mySql.


You should use a relational database, such as PostgreSQL, when you want to
model your data as relations (tables) instead of objects, or when you want
to use SQL, or when another application needs to access the data that only
speaks SQL, or ...

--
René Pijlman
Apr 1 '06 #5
> Can I use Pickle to store about 500,000 key value pairs.. or should I
use mySql. Which one is best for performance, as the key value pair
increases.


Pickle: absolutely out of the question.
Mysql: might work, albeit slowly.

Use berkeley DB (bsddb3), or zodb. I have no experience with the
latter, but bdb's scale far beyond that magnitude if necessary.

-Mike

Apr 2 '06 #6
Can i install berkeley db on BSD, I am having a virtual private server,
so I have privilates to install on it and do we have management tools
like phpmyadmin from berkely db as well, as I am not so good at
database management.

Thanks
Amaltas

Apr 9 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael Hohn | last post by:
Hi, under python 2.2, the pickle/unpickle sequence incorrectly restores a larger data structure I have. Under Python 2.3, these structures now give an explicit exception from...
0
by: Mike P. | last post by:
Hi all, I'm working on a simulation (can be considered a game) in Python where I want to be able to dump the simulation state to a file and be able to load it up later. I have used the standard...
6
by: Jim Lewis | last post by:
Pickling an instance of a class, gives "can't pickle instancemethod objects". What does this mean? How do I find the class method creating the problem?
10
by: crystalattice | last post by:
I'm creating an RPG for experience and practice. I've finished a character creation module and I'm trying to figure out how to get the file I/O to work. I've read through the python newsgroup...
5
by: Chris | last post by:
Why can pickle serialize references to functions, but not methods? Pickling a function serializes the function name, but pickling a staticmethod, classmethod, or instancemethod generates an...
3
by: fizilla | last post by:
Hello all! I have the following weird problem and since I am new to Python I somehow cannot figure out an elegant solution. The problem reduces to the following question: How to pickle a...
2
by: Michele Simionato | last post by:
Can somebody explain what's happening with the following script? $ echo example.py import pickle class Example(object): def __init__(self, obj, registry): self._obj = obj self._registry =...
2
by: Nagu | last post by:
I am trying to save a dictionary of size 65000X50 to a local file and I get the memory error problem. How do I go about resolving this? Is there way to partition the pickle object and combine...
1
by: IceMan85 | last post by:
Hi to all, I have spent the whole morning trying, with no success to pickle an object that I have created. The error that I get is : Can't pickle 'SRE_Match' object: <_sre.SRE_Match object at...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.