"Insert ... select ... On Duplicate Update" Question

2008-07-19 Thread mos
Is there a way to get "Insert ... select ... On Duplicate Update" to update the row with the duplicate key? Otherwise I'll have to use Replace which is inefficient because it deletes the old duplicated row and then inserts the new row with the same key. I'd much rather have it update the exist

Re: Suggestion Setting For Highload Server

2008-07-19 Thread mos
At 04:42 PM 7/19/2008, sangprabv wrote: Hi Mike, Thanks for the reply. 1. Currently the hardware is P4 2.8 on Slackware 12 with 1GB of DDR Memory (we plan to upgrade it) 2. The table type is MyISAM 3. There is no slow query, because all of the queries are a simple type 4. The table's size is incr

Re: Suggestion Setting For Highload Server

2008-07-19 Thread sangprabv
Hi Mike, Thanks for the reply. 1. Currently the hardware is P4 2.8 on Slackware 12 with 1GB of DDR Memory (we plan to upgrade it) 2. The table type is MyISAM 3. There is no slow query, because all of the queries are a simple type 4. The table's size is increasing dynamically with at least 10 thousa

Re: Tracking changes in large datasets over time

2008-07-19 Thread Rob Wultsch
On Sat, Jul 19, 2008 at 6:54 AM, Jake Peavy <[EMAIL PROTECTED]> wrote: > I may be wrong, but I think you could accomplish this through the use of > triggers. Triggers are designed to monitor data change activity. > > -jp Good thought. Using triggers to keep track of changes in an intermediary tab

Re: Suggestion Setting For Highload Server

2008-07-19 Thread mos
At 12:11 PM 7/19/2008, sangprabv wrote: Hi, I have situation where a MySQL server processes about 10-20 thousands requests per minute. I need suggestions from you for tuning up this server to get optimized setting. TIA Willy Willy, You will need post more information: 1) What type of ha

Suggestion Setting For Highload Server

2008-07-19 Thread sangprabv
Hi, I have situation where a MySQL server processes about 10-20 thousands requests per minute. I need suggestions from you for tuning up this server to get optimized setting. TIA Willy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists

Re: counting by countrycode

2008-07-19 Thread [EMAIL PROTECTED]
If your countrycodes are going to be embedded in the callednumber, you really need a delimiter like a dash "-". Then you can use some string functions to do the count. Ideally, as others suggested, the country code should be in its on field/column. Below is the general idea for the SELECT, of co

Re: Tracking changes in large datasets over time

2008-07-19 Thread Jake Peavy
On 7/18/08, Jason Yergeau <[EMAIL PROTECTED]> wrote: > > Hi Rob --- > > MySQL 5. > > > > On Fri, Jul 18, 2008 at 3:01 PM, Rob Wultsch <[EMAIL PROTECTED]> wrote: > > On Fri, Jul 18, 2008 at 2:00 PM, Jason Yergeau <[EMAIL PROTECTED]> > wrote: > >> I'm having trouble working through a data problem. A

Re: Tracking changes in large datasets over time

2008-07-19 Thread Rob Wultsch
On Sat, Jul 19, 2008 at 4:18 AM, Rob Wultsch <[EMAIL PROTECTED]> wrote: > On Fri, Jul 18, 2008 at 3:46 PM, Rob Wultsch <[EMAIL PROTECTED]> wrote: >> I'm sure there is a way to write this in a single query, but I bet it >> it is ugly as heck, probably with a bunch of derived tables. > > INSERT INTO

Re: Tracking changes in large datasets over time

2008-07-19 Thread Rob Wultsch
On Fri, Jul 18, 2008 at 3:46 PM, Rob Wultsch <[EMAIL PROTECTED]> wrote: > I'm sure there is a way to write this in a single query, but I bet it > it is ugly as heck, probably with a bunch of derived tables. INSERT INTO balances (userid, points) SELECT users.userid, users.points FROM users LEFT JOI