Python Forum
Which is Faster, List or SQL
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Which is Faster, List or SQL
#9
(Mar-16-2017, 09:13 PM)zivoni Wrote: Maybe you can "partition" your list somehow and process it in smaller batches?

map/reduce with external computers?  *giddy excitement*

If you're doing this more than once, then you're probably storing the data somewhere.  Like a file maybe?  If you're reading it every time, adding new things, and repeating, every single day, with whatever you generate needing to be available for the future... I think you should go with a db.  Even something small like sqlite.  Then the db can handle picking a few at random for you to use to generate new urls, you can quickly check if those generated urls already exist, add them to the existing tables, and move on.  

This sounds a lot like the sort of problem a database is designed to solve.
Reply


Messages In This Thread
Which is Faster, List or SQL - by AceScottie - Mar-16-2017, 06:29 PM
RE: Which is Faster, List or SQL - by micseydel - Mar-16-2017, 06:33 PM
RE: Which is Faster, List or SQL - by AceScottie - Mar-16-2017, 06:45 PM
RE: Which is Faster, List or SQL - by Larz60+ - Mar-16-2017, 06:41 PM
RE: Which is Faster, List or SQL - by micseydel - Mar-16-2017, 07:09 PM
RE: Which is Faster, List or SQL - by wavic - Mar-16-2017, 07:23 PM
RE: Which is Faster, List or SQL - by micseydel - Mar-16-2017, 07:44 PM
RE: Which is Faster, List or SQL - by zivoni - Mar-16-2017, 09:13 PM
RE: Which is Faster, List or SQL - by nilamo - Mar-16-2017, 09:26 PM
RE: Which is Faster, List or SQL - by AceScottie - Mar-16-2017, 10:15 PM
RE: Which is Faster, List or SQL - by wavic - Mar-16-2017, 10:23 PM
RE: Which is Faster, List or SQL - by Larz60+ - Mar-17-2017, 02:31 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020