Re: Table optimization ideas needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 27, 2008 at 10:03 AM, Chris <dmagick@xxxxxxxxx> wrote:

>
>  mysql> explain select count(*) from message;
> >
> > +----+-------------+---------+-------+---------------+--------+---------+------+----------+-------------+
> > | id | select_type | table   | type  | possible_keys | key    | key_len
> > | ref  | rows     | Extra       |
> >
> > +----+-------------+---------+-------+---------------+--------+---------+------+----------+-------------+
> > |  1 | SIMPLE      | message | index | NULL          | status |       1
> > | NULL | 23051499 | Using index |
> >
> > +----+-------------+---------+-------+---------------+--------+---------+------+----------+-------------+
> >
> > Three queries return the same results.
> >
>
> That's never going to be fast because you're using innodb tables.

Should I change it to MyISAM ones?

>
>
> From a previous post:
>
> > Then you can imagine how much time sql such as "select a,b from
> > table_name where c='d'" will take.
> >
> > I have a lot of tables like that. So my questions is:
> > What's your practice to optimize tables like that?
>
> I thought that's what you needed help with. ?
>
No. That's only part of it. I have a cron job, which get the total visits
often.

>
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>



-- 
Regards,
Shelley

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux