List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:January 8 2002 1:26pm
Subject:locking and queries
View as plain text  

>>>>> "Robert" == Robert Zino <rjz@stripped> writes:

Robert> Hi all,
Robert> I just wanted to check and verify that mysql cannot do row level locking.
Robert> does it do page or is it the entire table?

The proper email list for general questions like this is the
mysql@stripped mailing lists, not this email list which is
dedicated to discussing MySQL development.

Depending on the table handler you choose, MySQL supports table locks
(MyISAM), page locks (BDB), row level locks (InnoDB or Gemini) or
versioning (InnoDB).

Robert> also, can mysql do "dirty reads"?

When you have versioning you usually don't need dirty
reads. (Versioning is usually faster and more flexible than dirty
reads, especially when you just need dirty reads to avoid locks)

If you really need dirty reads, you can now get these by using Gemini
tables;  InnoDB should also support this within a shortly.

Note however that it's not obvious with locks type is most efficient
for a given applications; The only way to surely know is to do full
test of the application.  Please read the section "Locking methods" in
the MySQL manual for a discussion about this.

Robert> and when i do a "mysqladmin processlist" to see my queries on linux is there
Robert> a way to find the one
Robert> taking the most cpu cycles ?

The best way to find queries that takes a lot of cpu cycles is to
experiment with the the --log-slow and --long-query-times options


For technical support contracts, goto
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Michael Widenius <monty@stripped>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
locking and queriesRobert Zino7 Jan
  • Re: locking and queriesJeremy Zawodny7 Jan
  • locking and queriesMichael Widenius8 Jan