please help reading DB deadlock notice

2007-04-02 Thread Nikita Tovstoles
Hi, I'd really appreciate help with reading this db deadlock notice. Essentially, I'd like to understand: -what holds the lock that TX2 is waiting on index `token` of table `eviltwin/user_sessions`? I thought it'd be TX1 (hence deadlock ?), yet it appears that TX1 holds no locks -if the an

Re: Joins versus Grouping/Indexing: Normalization Excessive?

2007-04-02 Thread Micah Stevens
I think you're approaching this from the wrong angle. You'll want to put the data at the highest level at which it changes. i.e. If every song on an album is always the same year, put it at the album level, however, if it changes from song to song on a particular album, then you want it at the

Joins versus Grouping/Indexing: Normalization Excessive?

2007-04-02 Thread Daniel Cousineau
So I'm currently designing a database for a web site and intra net for my campuses student radio. Since I'm not getting paid for this and I'm doing this in my free time I kinda want to take my time and have the system setup as "perfectly" as any one college student can. I'm currently debating on

RE: UPDATE / not UPDATE??

2007-04-02 Thread Jerry Schwartz
Yes. It only reports the changed rows. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -Original Message- > From: Jesse [mailto:[EMAIL PROTECTED] > Sent: Monday, April 02, 2007 4:16 PM > To: MySQL List

Re: UPDATE / not UPDATE??

2007-04-02 Thread Jesse
Don't know? 5.0.22-community-nt-log Win XP Pro InnoDB Jesse - Original Message - From: sol beach To: Jesse Sent: Monday, April 02, 2007 4:22 PM Subject: Re: UPDATE / not UPDATE?? Might this behavior be version dependent; which you neglected to provide. Same for OS name &

Re: Tricky Sorting

2007-04-02 Thread Shannon Appelcline
I think you're right and using an IF is ultimately the right answer. However just substituting issuenum for issuedate doesn't do the right thing. Looking at my sorting a bit more analytically I think that what I need to do is, WHEN there isn't a month number, THEN substitute the existing month nu

UPDATE / not UPDATE??

2007-04-02 Thread Jesse
When I run the query: UPDATE InvHead I JOIN (SELECT InvNo,Sum(Rate + CASE WHEN AttendingAcademy=1 THEN 30 ELSE 0 END) AS InvTot FROM Participants P GROUP BY InvNo) AS PartSum ON PartSum.InvNo=I.InvNo SET I.Total=PartSum.InvTot WHERE (I.InvoiceType='CL' OR I.InvoiceType='CSS') AND I.RegF

Re: Database Replication Fallover

2007-04-02 Thread Scott Tanner
Ben, Check out Linux-ha ( http://linux-ha.org). We are using version 1 at my company, which is fairly easy to set up and there are a lot of good articles on it. With this you can create a virtual address to fail-over between systems, run commands / scripts during a fail over, and even kill

Complex sql help

2007-04-02 Thread Bryan Cantwell
I have a need to output a recordset that shows the record with the higest value for severity within a date range. That is easy enough, but, in the same query, I need to show that data 3 times in the same query. Once where event_avail = 1, then again where event_perf = 1 and finally where even_sec =

Thank you for the free ride

2007-04-02 Thread Carlos Proal
As probably you saw in the announcement (http://jcole.us/blog/archives/2007/03/31/mysql-conference-expo-free-ride-winners/), im one of the winners of the free ride to the Mysql Conference. So, i just want to say thanks to Jeremy Cole, Proven Scaling and the whole Mysql team for the opportuni

Re: Tricky Sorting

2007-04-02 Thread Brent Baisley
That should be fairly easy. What you are looking to do is have your sort field conditional. The ORDER BY doesn't have to specify a database field, it can be any field in your query. So you could do something like this: SELECT IF( issuemonth IS NULL, issuenum, issuedate) AS sortfield, issuedate,

Re: improving performance of server

2007-04-02 Thread mos
At 03:23 AM 4/2/2007, you wrote: sure, i am inserting the data with: LOAD DATA LOCAL INFILE 'lightning-data.txt' INTO TABLE strikes; does that clear things up? i assume that the data is first inserted into the table and then the index is created afterwards. Only if the table is empty when yo

Re: improving performance of server

2007-04-02 Thread Ananda Kumar
Hi Andrew, Since the default storage engine is myisam, increase the below parameter and then try your index operation. myisam_sort_buffer_size. This parameter is used for index creation in myisam. Also Set key_buffer to 5 - 50% of your RAM depending on how much you use MyISAM tables, but keep ke

RE: Help With a Week ( date ) query

2007-04-02 Thread Jerry Schwartz
The first part of the WHERE clause gives you the week number of a record's date, and compare it with today's week number. Note that WEEK("2008-01-01",7) will return 53, indicating that because 2008-01-01 is a Tuesday it is part of the last week of 2007. That, I think, is what you want. The second

Re: improving performance of server

2007-04-02 Thread andrew collier
sure, i am inserting the data with: LOAD DATA LOCAL INFILE 'lightning-data.txt' INTO TABLE strikes; does that clear things up? i assume that the data is first inserted into the table and then the index is created afterwards. following the creation of the database files i see that first one is f

Re: The time of last updated field

2007-04-02 Thread Duncan Hill
On Monday 02 April 2007 09:11:18 sam rumaizan wrote: > I have to two different fields Last_Updated and Story. I want whenever > Story Field got updated (modified) the time and date of the modification > get recorded (insert) in Last_Updated Field The answer you seek lies within the manual. http:/

The time of last updated field

2007-04-02 Thread sam rumaizan
I have to two different fields Last_Updated and Story. I want whenever Story Field got updated (modified) the time and date of the modification get recorded (insert) in Last_Updated Field - No need to miss a message. Get email on-the-go with Yahoo! Mail fo

Re: Database Replication Fallover

2007-04-02 Thread Ben Clewett
I forgot to mention that I am running Linux. If anybody has some idea of software which can do this, I'd be very interested. Regards, Ben Ben Clewett wrote: Dear MySql, I'm looking into availability and wonder if any member might be able to help me. I have two databases, one Primary and