sorting 1172026 entries

J. Mwebaze jmwebaze at gmail.com
Sun May 6 12:10:08 EDT 2012


On Sun, May 6, 2012 at 6:07 PM, Benjamin Schollnick <benjamin at schollnick.net
> wrote:

>
> On May 6, 2012, at 11:57 AM, J. Mwebaze wrote:
>
> I have several lists with approx 1172026 entries. I have been trying to
> sort the records, but have failed.. I tried lists.sort() i also trired
> sorted python's inbuilt method. This has been running for weeks.
>
> Any one knows of method that can handle such lists.
>
>
> The issue there is the sheer size of the list.  I can't think of an
> algorithium that wouldn't have a problem with a list of that size.
>
> Two suggestions....
>
> 1) Is there no other way to organize this data, other than having it in a
> single list?  You can't organize it by, for example, zip code, area code,
> year, or something, and make multiple lists?  Reducing the size would speed
> the sort up.
>
> 2) Maybe consider a different storage method, for example, adding the data
> into a database?  And then connecting to the database via python?
>
> - Benjamin
>
>
I could try the database option..



-- 
*Mob UG: +256 (0) 70 1735800 | NL +31 (0) 6 852 841 38 | Gtalk: jmwebaze |
skype: mwebazej | URL: www.astro.rug.nl/~jmwebaze

/* Life runs on code */*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120506/bbe7765e/attachment.html>


More information about the Python-list mailing list