<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6603.0">
<TITLE>RE: Fast Searches</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Do you mean that lines are separated by a tab in stead of a carriage return? In that case, try something like this:</FONT>
</P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">set linedelimiter to tab</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">repeat for each line myline in mydata</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial"> add 1 to myArray [item 4 of myLine]</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">end repeat</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">set linedelimiter to cr</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">put keys (myArray) into myList</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">put 0 into x</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">repeat for each line myItem in myList</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial"> if myArray [myItem] = 1 then add 1 to x</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">end repeat</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">put x</FONT>
</P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">The message box will show the number of times a 'fourth item' occurrs only once. Is that what you want?</FONT>
</P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Wil Dijkstra</FONT>
</P>
<BR>
<UL>
<P><FONT SIZE=2 FACE="Arial">----------</FONT>
<BR><B><FONT SIZE=2 FACE="Arial">From:</FONT></B> <FONT SIZE=2 FACE="Arial">metacard-bounces@lists.runrev.com on behalf of Ray Horsley</FONT>
<BR><B><FONT SIZE=2 FACE="Arial">Reply To:</FONT></B> <FONT SIZE=2 FACE="Arial">Discussions on Metacard</FONT>
<BR><B><FONT SIZE=2 FACE="Arial">Sent:</FONT></B> <FONT SIZE=2 FACE="Arial">Tuesday, January 11, 2005 17:24</FONT>
<BR><B><FONT SIZE=2 FACE="Arial">To:</FONT></B> <FONT SIZE=2 FACE="Arial">Metacard List</FONT>
<BR><B><FONT SIZE=2 FACE="Arial">Subject:</FONT></B> <FONT SIZE=2 FACE="Arial">Fast Searches</FONT>
</P>
<P><FONT SIZE=2 FACE="Monaco">Greetings Listers,</FONT>
</P>
<P><FONT SIZE=2 FACE="Monaco">I'm working with large amounts of data, say 50,000 tab delimited lines, </FONT>
<BR><FONT SIZE=2 FACE="Monaco">where the 4th item in each line is the same for every 20 or so lines. </FONT>
<BR><FONT SIZE=2 FACE="Monaco">Does anybody have a fast way of determining how many unique 4th items </FONT>
<BR><FONT SIZE=2 FACE="Monaco">there are in the 50,000 lines?</FONT>
</P>
<P><FONT SIZE=2 FACE="Monaco">A repeat loop examining each line is certainly out of the question, and </FONT>
<BR><FONT SIZE=2 FACE="Monaco">I've tried using various functions such as itemOffset after sorting </FONT>
<BR><FONT SIZE=2 FACE="Monaco">ascending and descending, but this too is turning out to be kind of </FONT>
<BR><FONT SIZE=2 FACE="Monaco">slow.</FONT>
</P>
<P><FONT SIZE=2 FACE="Monaco">Thanks,</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Monaco">Ray Horsley</FONT>
<BR><FONT SIZE=2 FACE="Monaco">Developer, LinkIt! Software</FONT>
</P>
<P><FONT SIZE=2 FACE="Monaco">_______________________________________________</FONT>
<BR><FONT SIZE=2 FACE="Monaco">metacard mailing list</FONT>
<BR><FONT SIZE=2 FACE="Monaco">metacard@lists.runrev.com</FONT>
<BR><U><FONT COLOR="#0000FF" SIZE=2 FACE="Monaco"><A HREF="http://lists.runrev.com/mailman/listinfo/metacard">http://lists.runrev.com/mailman/listinfo/metacard</A></FONT></U>
</P>
<BR>
</UL>
</BODY>
</HTML>