Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quantity of data transferred with a select
Message
From
13/05/2008 05:50:06
 
 
To
13/05/2008 05:43:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01316587
Message ID:
01316589
Views:
18
This message has been marked as the solution to the initial question of the thread.
>Hi,
>I've a doubt regarding a select.
>
>There are 2 tables: ITEMS and SUPPLIERS.
>Each item can be related to a supplier.
>
>
>TABLE ITEMS
>-----------
>ITEM_PK INT
>SUPPL_FK C(4)
>etc...
>
>
>TABLE SUPPLIERS
>-----------
>SUPPL_PK C(4)
>SUPPL_NME C(40)
>etc...
>
>
>I need to collect all suppliers present in the ITEMS table.
>Note that the SUPPLIERS table could contain 1000 records and only 100 of them could be present in the ITEMS table.
>
>The select command I use to gather suppliers name is:
>
>select ;
>      SUPPLIERS.SUPPL_NME ;
>   from ITEMS ;
>   join SUPPLIERS on ITEMS.SUPPL_FK == SUPPLIERS.SUPPL_PK ;
>   where NOT SUPPL_FK == ""
>   order by SUPPLIERS.SUPPL_NME ;
>   group by SUPPLIERS.SUPPL_NME
>
>
>There's an index on SUPPL_FK.
>
>The ITEMS table is 20 MB large and the SUPPLIERS table is quite small (300 KB).
>The select transfers about 20 MB, while I was expecting to see a small amount of data passing through the network. :(
>
>sys(3054) says that rushmore is using the tag "SUPPL_FK" to optimize the table
>
>I'm surely missing something obvious.. any help? :)
---
select distinct SUPPL_FK ;
       from ITEMS
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform