Changes between Initial Version and Version 1 of SortingResults


Ignore:
Timestamp:
09/04/18 13:49:12 (6 years ago)
Author:
alisdair
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SortingResults

    v1 v1  
     1In a search for, in this case, AIA data using "sample=7200", the returned results are not date ordered.  
     2{{{ 
     3IDL> a=vso_search('2014-09-19T01:00:00', '2014-09-19T21:00:00',instrument='AIA', sample=7200) 
     4Records Returned : JSOC : 10/10 
     5Records Returned : SDAC_AIA : 0/0 
     6IDL> print, a.time 
     7{ 2014-09-19T11:00:01 2014-09-19T11:00:02}{ 2014-09-19T03:00:01 
     82014-09-19T03:00:02}{ 2014-09-19T15:00:01 2014-09-19T15:00:02}{ 
     92014-09-19T01:00:01 2014-09-19T01:00:02}{ 2014-09-19T07:00:01 
     102014-09-19T07:00:02}{ 2014-09-19T19:00:01 2014-09-19T19:00:02}{ 
     112014-09-19T09:00:01 2014-09-19T09:00:02}{ 2014-09-19T13:00:01 
     122014-09-19T13:00:02}{ 2014-09-19T05:00:01 2014-09-19T05:00:02}{ 
     132014-09-19T17:00:01 2014-09-19T17:00:02} 
     14}}} 
     15However when doing a straight, non-sampled, search for AIA data, it is returned date ordered. 
     16{{{ 
     17IDL> a=vso_search('2014-09-19T01:00:00', '2014-09-19T01:00:5',instrument='AIA')) 
     18Records Returned : JSOC : 24/24 
     19Records Returned : SDAC_AIA : 0/0 
     20IDL> print, a.time                                                               
     21{ 2014-09-19T01:00:01 2014-09-19T01:00:02}{ 2014-09-19T01:00:02 
     222014-09-19T01:00:03}{ 2014-09-19T01:00:06 2014-09-19T01:00:07}{ 
     232014-09-19T01:00:07 2014-09-19T01:00:08}{ 2014-09-19T01:00:07 
     242014-09-19T01:00:08}{ 2014-09-19T01:00:08 2014-09-19T01:00:09}{ 
     252014-09-19T01:00:11 2014-09-19T01:00:12}{ 2014-09-19T01:00:11 
     262014-09-19T01:00:12}{ 2014-09-19T01:00:13 2014-09-19T01:00:14}{ 
     272014-09-19T01:00:14 2014-09-19T01:00:15}{ 2014-09-19T01:00:16 
     282014-09-19T01:00:17}{ 2014-09-19T01:00:18 2014-09-19T01:00:19}{ 
     292014-09-19T01:00:19 2014-09-19T01:00:20}{ 2014-09-19T01:00:20 
     302014-09-19T01:00:21}{ 2014-09-19T01:00:23 2014-09-19T01:00:24}{ 
     312014-09-19T01:00:23 2014-09-19T01:00:24}{ 2014-09-19T01:00:25 
     322014-09-19T01:00:26}{ 2014-09-19T01:00:26 2014-09-19T01:00:27}{ 
     332014-09-19T01:00:30 2014-09-19T01:00:31}{ 2014-09-19T01:00:30 
     342014-09-19T01:00:31}{ 2014-09-19T01:00:31 2014-09-19T01:00:32}{ 
     352014-09-19T01:00:32 2014-09-19T01:00:33}{ 2014-09-19T01:00:35 
     362014-09-19T01:00:36}{ 2014-09-19T01:00:35 2014-09-19T01:00:36} 
     37}}} 
     38**Why does this happen?** \\ 
     39\\ 
     40Simply the results set is returned as the database returns it to the query. So if the query is returned in date order then the results will be date ordered. However the DB will return the results in the most efficient way possible and this may not in fact be time ordered. \\ 
     41\\ 
     42**Why are they not just sorted?** 
     43\\ 
     44\\ 
     45Sorting is an expensive operation on complex queries especially when the DB is potentially returning hundreds of thousands of results. In the past we have had issues with data providers timing out for these very large queries, especially those which specify a sample time, as they bypass the normal DataProvider limits. Sorting is left to the client to do.