Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quantity of data transferred with a select
Message
De
13/05/2008 05:43:22
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Quantity of data transferred with a select
Divers
Thread ID:
01316587
Message ID:
01316587
Vues:
56
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? :)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform