<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6603.0">
<TITLE>Which is faster?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">I have a table (X) which has over 200 thousand records and is linked to another table (Y) as one-to-one.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I need to select certain records from the entire complex, and I was wondering which one of these would do it faster?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">[1] access table_x link order_no to order_no of table_y</FONT>
<BR> <FONT SIZE=2 FACE="Arial">select if field1 of table_x = 1234</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">of is this faster?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">[2] access table_x link order_no to order_no of table_y</FONT>
<BR> <FONT SIZE=2 FACE="Arial">select table_x if field1 of table_x = 1234</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I figured that either way is the same, but I've timed the 2nd option and it's remarkably faster. Is this because PH is actually filtering out the records in the query, at the table level, if you say "select table if", as opposed to waiting for the entire record complex and then applying the filter?</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Thanks guys</FONT>
</P>
<P><I><FONT COLOR="#0000FF" SIZE=4 FACE="Arial">Fernando Olmos</FONT></I>
<BR><B><FONT SIZE=2 FACE="Arial">MIS</FONT></B>
<BR><B><FONT SIZE=2 FACE="Arial">Senior Analyst Programmer</FONT></B>
</P>
<P><SPAN LANG="en-au"><B><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">HPA</FONT></B></SPAN><B><SPAN LANG="en-us"></SPAN></B><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Arial"><BR>
</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT COLOR="#000000" SIZE=2 FACE="Arial">Direct: 03 9217 5411</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><BR>
</SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT COLOR="#000000" SIZE=2 FACE="Arial">Mobile: 0410 382 857</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Arial"><BR>
</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><FONT COLOR="#000000" SIZE=2 FACE="Arial">Fax: 03 9217 5716</FONT><FONT FACE="Arial"></FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"> </SPAN>
</P>
<P><SPAN LANG="en-au"></SPAN><A HREF="file:///H:/Appdata/Microsoft/Signatures/www.hpa.com.au"><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"><U></U></SPAN><SPAN LANG="en-au"><U><B><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">www.hpa.com.au</FONT></B></U></SPAN><SPAN LANG="en-au"></SPAN></A><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN>
</P>
<BR>
<pre>**********************************************************************
IMPORTANT
The contents of this e-mail and its attachments are confidential and intended
solely for the use of the individual or entity to whom they are addressed. If
you received this e-mail in error, please notify the HPA Postmaster, postmaster@hpa.com.au,
then delete the e-mail.
This footnote also confirms that this e-mail message has been swept for the
presence of computer viruses by Ironport. Before opening or using any
attachments, check them for viruses and defects.
Our liability is limited to resupplying any affected attachments.
HPA collects personal information to provide and market our services. For more
information about use, disclosure and access see our Privacy Policy at
www.hpa.com.au
**********************************************************************
</pre></BODY>
</HTML>