Home » Performance » MySQL » Limits and datatype for connection_id()
Limits and datatype for connection_id() [message #3650] Fri, 24 October 2008 09:25 Go to next message
Poul  is currently offline Poul
Messages: 1
Registered: October 2008
Junior Member
Hi,

we use connection_id() return value to fill some fields in a mysql-myisam database.

I have spent a lot of time researching about the returned value, but I have not found any interesting information, so I'm asking this blog which I follow from one year now.

My questions are:

- select connection_id() returns an integer value: what are the limits? How should a declare the field to store it?

- what will happen when the limits are reached? Yes, it is possible; we are managing millions of connections per day on a single database...

- is it there any other better parameter available in a query, to ensure that two concurrent users will have returned different values?

Many thanks in advance.
Re: Limits and datatype for connection_id() [message #5287 is a reply to message #3650 ] Sat, 23 January 2010 12:40 Go to previous message
xaprb  is currently offline xaprb
Messages: 168
Registered: April 2008
Location: Charlottesville, Virginia...
Senior Member
Use INT UNSIGNED NOT NULL. I am pretty sure it's not a BIGINT, but I can't remember why I believe that.


Baron Schwartz, Director of Consulting, Percona Inc.
http://www.percona.com/ | http://www.mysqlperformanceblog.com/
24/7 Emergency : +1 888 401 3401 ext 911
Previous Topic:Does MySQL have a memory ceiling you can set?
Next Topic:Need Help for Mysql-Query optimization
Goto Forum:
  


Current Time: Tue Mar 16 01:34:46 EDT 2010

Total time taken to generate the page: 0.13941 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.