|
MySQL Newsletter
Author: MySql | Tuesday December 03, 2002
MySQL Newsletter is a convenient channel in keeping you informed of the latest MySQL news.
Welcome to MySQL Newsletter
Articles in this newsletter:
INTRODUCTION
* Pre-register for the MySQL Users Conference now!
PRODUCTS
* MySQL 4.0.5-beta Released
FEATURES
* Using persistent connections with MySQL
TRAINING
* Upcoming MySQL Training courses
PARTNER CORNER
* First Sponsors sign up for the MySQL Users Conference and Expo
LATEST NEWS
* Latest MySQL News
--------------------------------------------------
INTRODUCTION
Pre-register for the MySQL Users Conference now!
The first annual MySQL Users Conference & Expo
will be held in April 2003 in San Jose,
California, USA. As an attendee you can
participate technical as well as business sessions
cover many MySQL topics. Detailed information
about the MySQL User Conference in April 2003 is
now available at
http://www.mysql.com/uc2003/
Come to the MySQL Users Conference & Expo.
Pre-registration is now online at
https://order.mysql.com/uc2003/
--------------------------------------------------
PRODUCTS
MySQL 4.0.5-beta Released
MySQL 4.0.5-beta, has been released and is now
available in source and binary form for a number
of platforms from our download pages at
http://www.mysql.com/ downloads/ and mirror
sites.
Version 4.0 of the MySQL server includes many
enhancements and new features in comparison to the
previous version 3.23. You can see the changelog
at
http://www.mysql.com/doc/en/News-4.0.5.html
--------------------------------------------------
FEATURES
Using persistent connections with MySQL
Peter Zaitsev
Persistent connections is a concept, which is
designed to improve performance for some
application. Instead of connection being
established for each operation, it is opened once
and kept in pool for the applications lifetime.
Persistent connections concept allows elimination
of several types of overheads, e.g. authentication
is performed only once, and so extra network
traffic is saved. Some internal structures have to
be allocated to handle extra connection. Finally
there could be some connection level caches, which
need to be filled up for proper performance.
MySQL is tuned to keep all of these overheads low.
Authentication in MySQL is rather fast, which
takes only one roundtrip and small amount of
traffic. The slowest operation involved is
connection creation. Creation of the OS level
thread is eliminated with thread cache. Freed
threads are not freed to OS but kept in the pool
to be reused by new connections. Most of the
caches in MySQL are kept global. Even tables
opened by connection are kept in the table cache
to be recycled. As MySQL has fast connections
handles, in most cases performance benefit of
using persistent connection is low.
Are there any drawbacks of persistent connections?
Unfortunately there are. At first each connections
takes up resources. This includes MySQL internal
resources (memory, table cache elements,
connections) as well as OS level resources -
threads, open files and sockets. Some operating
systems are quite OK with this, while others may
show performance degradation. MySQL resources are
often more important. By having the same amount of
memory that would be used for persistent
connections, you usually can configure MySQL to
use larger buffers, which often gives extra
performance. Will this outweigh the benefit from
persistent connections? It completely depends on
the application.
Persistent connections can also lead you to the
trouble if you're not using them carefully enough.
Some issues described here are handled
automatically by good persistent connection
support, while others are not. If you've started
transaction but did not complete it, the result
could be unpredictable - based on what next
connection user will do first commit or rollback
transaction. Exactly the same issue happens with
locked tables. They could be locked stale leading
to various issues. Moreover other thread specific
settings are left - connection specific variables
(sort_buffer,record_buffer...), server level
variables (@my_variable), state dependend
functions found_rows(), last_insert_id() etc.
If you're planning to use persistent connections
and are using features similar to the ones listed
above, you should check if your persistent
connections support library handles these issues
and if it does not, you need to fix them
manually.
Due to the nature of persistent connections,
biggest benefit by using them can be achieved over
slow network connections and with a few quick
queries per connection. If you have complex
queries, which take long time to execute or more
than 3-5 queries per connection, persistent
connections will give you almost no benefit.
Conclusion: Instead of blindly enabling persistent
connections in MySQL you may wish to benchmark
your application to see if persistent connections
really give you the performance benefit, and if it
is large enough to justify for the limitations
introduced by them.
--------------------------------------------------
TRAINING
Upcoming MySQL Training courses
MySQL AB is holding numerous training courses in
the following countries: USA, Germany, France, UK,
Australia, and Sweden. Check out dates and
locations at http://www.mysql.com/training/
Special Christmas offer on MySQL training
courses!
Christmas is approaching and MySQL AB already
offers you a present. If you register between
today and December 31st 2002 to any MySQL training
course provided by MySQL AB, you get an immediate
10% discount on the course fee! Seize this
opportunity to learn how to make the dolphin swim
faster and jump higher.
Check out our courses and register at:
http://www.mysql.com/training/
--------------------------------------------------
PARTNER CORNER
First Sponsors sign up for the MySQL Users
Conference and Expo
The MySQL Users Conference and Expo 2003 will be
the first event of this kind and promises to be
the biggest gathering of the MySQL community.
CTOs, CIOs, product managers, software developers,
DBAs and open source enthusiasts will converge in
Silicon Valley to explore MySQL technology, MySQL
related products and services from partners, and
discover business opportunities.
As an exhibitor/sponsor/advertiser at the MySQL
User Conference, you have a unique opportunity to
maximize your connection to MySQL and the open
source community at large.
Read more at: http://www.mysql.com/events/uc2003/
--------------------------------------------------
LATEST NEWS
Latest MySQL News
Special Christmas offer on MySQL training
courses
http://www.mysql.com/training
Rackspace Managed Hosting and MySQL Power
DriverGuide.com
http://www.mysql.com/press/release_2002_15.html
MySQL Thanks the Free Software Foundation
http://www.mysql.com/news/article-178.html
MySQL AB and Nusphere Corporation Announce
Settlement
http://www.mysql.com/press/release_2002_14.html
MySQL Database Receives 2002 Linux Journal
Readers' Choice Award for Fifth Year
http://www.mysql.com/news/article-176.html
MySQL AB announces its new "Developing Dynamic Web
Applications with MySQL and PHP" course
http://www.mysql.com/news/article-175.html
--------------------------------------------------
UNSUBSCRIBING & FEEDBACK
You can send us queries and give us feedback at
http://www.mysql.com/feedback/
You can unsubscribe from this newsletter from your profile page:
http://www.mysql.com/login.php
or by replying to this e-mail with subject 'unsubscribe'
ABOUT THE NEWSLETTER
Please read http://www.mysql.com/newsletter/
________________________________________________
Copyright © 2002 MySQL AB. All rights reserved.
You are free to distribute this newsletter,
as long as you don't make any changes.
|