Hi
I have this query on ma table:

explain select count(przetargi_zaw.id_kat),przetargi_typy.nazwa as typy from
przetargi_typy left join przetargi_zaw  on przetargi_zaw.id_kat =
przetargi_typy.id group by typy;

i see:

+-------------------+-------+-------------------+--------+-----------+------
-----------------+--------+-----------------------+
| table                  | type  | possible_keys | key     | key_len | ref
|  rows | Extra                       |
+-------------------+-------+-------------------+--------+-----------+------
-----------------+--------+-----------------------+
| przetargi_typy | ALL  | NULL               | NULL  |    NULL | NULL
|    7      | Using temporary |
| przetargi_zaw   | ref     | id_kat               | id_kat |             4
| przetargi_typy.id |   14     | Using index          |
+-------------------+-------+-------------------+---------+----------+------
-----------------+--------+-----------------------+
2 rows in set (0.00 sec)

Are my table good optimized ?? (i use index right way ?)

Oops, my table:

+-------------+--------------------+------+-----+---------+----------------+
| Field           | Type                 | Null | Key     | Default | Extra
|
+-------------+--------------------+------+--------+---------+--------------
--+
| id               | int(7) unsigned |          | PRI    | NULL    |
auto_increment |
| id_kat       | int(5) unsigned |           | MUL | 0       |
|
| krotko       | varchar(255)      | YES  |           | NULL    |
|
| nazwa_pliku | varchar(60)   |           |           |          |
|
+-------------+--------------------+------+--------+---------+--------------
--+


+-------+-----------------+------+-----+---------+----------------+
| Field | Type                      | Null | Key | Default | Extra
|
+-------+----------------------+------+-----+---------+----------------+
| id         | int(5) unsigned |         | PRI | NULL    | auto_increment |
| nazwa | char(50)              |         |     | -       |                |
+-------+---------------------+------+-----+---------+----------------+

regards
Ireneusz Piasecki
KomNet s.c.



-- 

Okresl Swoje potrzeby - my znajdziemy oferte za Ciebie!
[ http://oferty.onet.pl ]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to