# Select slow

**URL:** <https://forums.percona.com/t/select-slow/348>\
**Category:** Other MySQL® Questions\
**Created:** [June 7, 2007, 9:51am UTC](https://forums.percona.com/t/select-slow/348 "2007-06-07T09:51:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shalmoli](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@shalmoli](https://forums.percona.com/u/shalmoli)\
**Post date:** [June 7, 2007, 9:51am UTC](https://forums.percona.com/t/select-slow/348/1 "2007-06-07T09:51:29Z")

</div>

I have two tables - one with around 80,000 rows(27 fields) and the other with 65,000 rows(2 fields).  
When I do a simple select which involves a join, the database hangs. Show processlist displays the status as ‘sending data’ - this stage exists for indefinite time.

Select count(tbl1.tbl1\_id) from tbl1,tbl2 where tbl1.tbl1\_id = tbl2.foreign\_key

Each of the tables have a primary key and no other index.

What may I do to make the joins faster.

---

<div class="post-metadata">

**Author:** ![VictorZ](https://avatars.discourse-cdn.com/v4/letter/v/b3f665/32.png) [@VictorZ](https://forums.percona.com/u/VictorZ)\
**Post date:** [June 16, 2007, 10:53am UTC](https://forums.percona.com/t/select-slow/348/2 "2007-06-16T10:53:48Z")

</div>

Have you tried defining an index on “tbl2.foreign\_key”
