AFAIK there is no sort functionality built into PyTables. I think there are 4 ways to do it:
1.) load all 7.5 million records and sort it in memory (if it fits into the memory) 2.) implement your own external sorting algorithm (http://en.wikipedia.org/wiki/External_sorting) using pytables iterator or by slicing through your table in chunks 3.) create a vector of indices pre-sorted by your criteria and store it in your hdf5 structure. Then use this vector to retrieve the values with the correct sorting. 4.) if you know that you always want to access the data with this sorting, then you can also store the values with the appropriate sorting in the table cheers Ümit On Thu, Mar 22, 2012 at 5:02 PM, sreeaurovindh viswanathan <sreeaurovi...@gmail.com> wrote: > Hi, > > If I have three columns in a table and if i wish to sort based on one > field and then on the other what would be the recommended method.I > would be sorting atleast 75,00,000 records at a time. > > ie I would like to use something equivalent the following sql query. > > Select * from sample.table order by query desc,keyword asc. > > How should i do it.. > > Thanks > Sree aurovindh > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Pytables-users mailing list > Pytables-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pytables-users ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users