LDAS imposes a limit on the number of rows that can be returned from a database query. The limit is currently set to 10000, and it cannot be raised arbitrarily due to memory limitations. This is a serious bottleneck if you want to work with millions of database entries. One workaround would be to submit a series of queries, customized to subdivide the dataset into blocks of fewer than 10000 rows, but this would be tedious to do by hand.
To get around this limitation, the getMeta utility (FAQ article about guild and getMeta) takes an '-a' option which instructs it to retrieve all database entries matching the query. getMeta achieves this by submitting the query and retrieving the results into a temporary file, then scanning the file; if the file contains a number of rows which is an exact multiple of 1000, getMeta assumes that LDAS truncated the output. In this case, it constructs and submits a modified query which excludes the rows already received. getMeta repeats this process until all matching rows have been retrieved, then concatenates all the temporary files into a single big file. This can take a long time (the average retrieval rate is typically 100-200 rows per second), so you may wish to use the '-v' option, which causes getMeta to print a progress message each time it submits a query.
getMeta -a -v -d llo -q "select start_time,start_time_ns,amplitude,snr,event_id from sngl_burst where search='TFCLUSTERS' order by start_time,start_time_ns" -o llo_tfc.xmlIt is also possible that you want more than 10000 rows, but not necessarily all the matching rows in the database. You can explicitly limit the number of rows, to 50000, for instance, by including the clause "fetch first 50000 rows only" at the end of the SQL query (after the "order by..." clause).
The lwtprint command-line utility and the readMeta Matlab function allow you to specify a subset of rows to read from the file. For example, you can quickly print the first 10 rows of a big file using:
lwtprint big_table.xml -r 1-10and you can read the first 1000 rows into Matlab arrays using:
dat = readMeta('big_table.xml',[1:1000]);