On Thu, Mar 27, 2008 at 1:55 PM, Chris <[EMAIL PROTECTED]> wrote:
> Good idea. But I wonder whether calling the trigger each insert will loose
> > any performance.
> >
>
> It's going to affect things slightly but whether it'll be noticable only
> you can answer by testing.
>
> Another option I som
Good idea. But I wonder whether calling the trigger each insert will
loose any performance.
It's going to affect things slightly but whether it'll be noticable only
you can answer by testing.
Another option I sometimes see is set up a replicated slave and run your
reports off that instead of
On Thu, Mar 27, 2008 at 10:40 AM, Chris <[EMAIL PROTECTED]> wrote:
>
> That's never going to be fast because you're using innodb tables.
> >
> > Should I change it to MyISAM ones?
> >
>
> It depends.
>
> Do you need or use transactions? You can't change - myisam doesn't support
> them.
>
I ha
That's never going to be fast because you're using innodb tables.
Should I change it to MyISAM ones?
It depends.
Do you need or use transactions? You can't change - myisam doesn't
support them.
No. That's only part of it. I have a cron job, which get the total
visits often.
If you
On Thu, Mar 27, 2008 at 10:03 AM, Chris <[EMAIL PROTECTED]> wrote:
>
> mysql> explain select count(*) from message;
> >
> > ++-+-+---+---++-+--+--+-+
> > | id | select_type | table | type | possible_keys | key|
mysql> explain select count(*) from message;
++-+-+---+---++-+--+--+-+
| id | select_type | table | type | possible_keys | key| key_len
| ref | rows | Extra |
++-+-+---
Thank you very much, Chris. :)
Fyi,
On Wed, Mar 26, 2008 at 1:27 PM, Chris <[EMAIL PROTECTED]> wrote:
> Shelley wrote:
>
> >
> > +--+---+--+-+---++
> > | Field| Type | Null | Key | Default
> > | Extr
Shelley wrote:
+--+---+--+-+---++
| Field| Type | Null | Key | Default
| Extra |
+--+---+--+-+---++
| id
+--+---+--+-+---++
| Field| Type | Null | Key | Default |
Extra |
+--+---+--+-+---++
| id | int(11)
Shelley wrote:
Yes, Index can help a lot.
But actually there has been five indices. The table takes 1.4G space
while the indices take 2.3G.
The select sentence is still slow. :(
Post your exact query, table definition(s), indexes and see if anyone
has some suggestions.
If it's a mysql db,
Yes, Index can help a lot.
But actually there has been five indices. The table takes 1.4G space while
the indices take 2.3G.
The select sentence is still slow. :(
On Tue, Mar 25, 2008 at 11:50 AM, Chris <[EMAIL PROTECTED]> wrote:
> Shelley wrote:
> > Hi all,
> >
> > I made a post a week ago to a
From a quick perusal of the article Chris mentions, I'd generally agree
with that view about table optimization -- I'm not an expert on
Postgres, but the recommendations generally seem to apply to MySQL as well.
My basic view is that, if you are routinely doing a select on millions
of rows, y
Shelley wrote:
Hi all,
I made a post a week ago to ask for the idea of the fastest way to get
table records.
Fyi,
http://phparch.cn/index.php/mysql/35-MySQL-programming/126-fastest-way-to-get-total-records-from-a-table
Look at the time even a 'count(1)' took.
Then you can imagine how much
13 matches
Mail list logo