Anup reni <foxprone....@gmail.com> writes: > Hi I'm new to python and planning to make a web app which contains a large > amount of data and involves comparing two data sets. Which is better to use > in python, a Dictionary or Mysql?
Is it important for your data to be persistent (i.e. live across restarts of your web app)? If so (and I assume this is the case), then you need some form of persistence. "MySQL" comes with such persistency; with a Python "dict" you would need persistency in addition. For more guidance, a clearer description of "large amount" would be necessary. Python "dict"s usually are maintained in memory; data maintained there should not exceed the order of GB. In a "MySQL" database you can store larger amounts of data. Further considerations can be how you need to access the data sets. Python "dict"s support efficient access by a single key; "MySQL" supports various efficient access paths based on the indexes you define. -- https://mail.python.org/mailman/listinfo/python-list