Hi Douglas,
Thanks for your prompt reply. I read through the description of REPLACE and
tested it as well. It seems just fine, but the idea that it would DELETE and
then insert if a match is found, seems like a warning to me.
I need to know this: can it happen that in between this delete and
Hi Ravi
You are correct. I was just sitting here thinking about this after I
sent that and realized that what I said was incorrect; the REPLACE
command will not do what you want, because it delete a record instead
of updating it, it has no way to know what the previous value is.
You
Hi Ravi,
you can take a look at:
http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
which might take care of your problem.
/Johan
Douglas Sims skrev:
Hi Ravi
You are correct. I was just sitting here thinking about this after I
sent that and realized that what I said was
Much better. Good job.
Douglas Sims
[EMAIL PROTECTED]
On Aug 29, 2006, at 1:26 AM, Johan Höök wrote:
Hi Ravi,
you can take a look at:
http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
which might take care of your problem.
/Johan
Douglas Sims skrev:
Hi Ravi
You are
Douglas Sims wrote:
Hi Ravi
You are correct. I was just sitting here thinking about this after I
sent that and realized that what I said was incorrect; the REPLACE
command will not do what you want, because it delete a record instead
of updating it, it has no way to know what the
Dear All,
Thanks for the prompt replies. The version of MySQL we are using
(4.1.14-standard-log) supports INSERT ON DUPLICATE, hence I am using this.
Have a fantastic day!
Regards,
Ravi.
_
From: Douglas Sims [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 29 August, 2006 12:02 PM
To:
Hi,
I recently upgrade our master to MySQL 5.0.24. But, I changed on
option to log_bin=server-log-bin, as a result the binary log has
changed from server-bin.000228 to server-log-bin.01...
So now, the slave throw me an could not find first log file in binary
log index.
I suppose I have to do
Logan, David (SST - Adelaide) wrote:
Hi Folks,
Does anybody have any idea when 5.1 may come to General Release? I am
particularly interested in MySQL Cluster as I have several databases
(around 50) totalling 26Gb and would like to consider moving to this
version because of the Cluster Disk
Hi,
I am trying to build a query that does a sum if a certain parameter is set.
For example:
I have a row with four fields: code1, code2, duration and bytes. My current
query looks something like this: SELECT code1 as code, sum(bytes) as bin,
max(bytes) as min, avg(bytes) as ain, count(bytes)
[snip]
+---+--+---+-+--
+-+
| code | bin | min | ain |
cin | dur |
+---+--+---+-+--
+-+
|
I wrote a fairly large query that summarizes our sales into monthly
totals by business unit, then left joins on some other information from
a bunch of other tables.
Running the query takes a long time.
I'm considering whether to store my summary data as a table, like this:
create table
Matthew Wilson writes:
[...]
I suspect this is a universal problem. All general advice would be
appreciated. Perhaps a stored procedure is not the way to go.
Mysql 5.1 has CREATE EVENT, that somewhat mimics Oracle's jobs.
I prefer to run a shell script in a cron job, like this:
#!/bin/bash
http://www.solidtech.com/en/carrier-grade/index.asp
http://dev.soliddb.com/en/index.php
On 29/08/06, Ratheesh K J [EMAIL PROTECTED] wrote:
What is this solidDB? where can i get much info on this??
Thanks,
Ratheesh Bhat K J
Does using LIMIT 1 with UPDATE provide a performance improvement when
the WHERE condition is on a unique index or primary key?
R.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
FWIW, my preliminary testing shows no performance increase for adding
LIMIT 1 to the following construct:
[ SELECT | UPDATE ]
WHERE Table.UniqueID = N
In fact, there seems to be a slight performance edge to NOT appending
LIMIT 1 to the statement.
R.
-Original Message-
sorry for the double post.
if i want to have a row of about 100 records. and everytime i insert a new
record, it gets pushed on the top, and the bottom one gets pushed out, sort
of like a heap. is this possible?
i know i can just delete the record, etc, but i was wondering if there was a
built
hello
i'm developing a program on visual.net 2003 where i need to extract data from a
date time format column
working with mysql.net component for extract via mysqlcommands and dataadapters
im fillin datagrills but the column displayed only presents the date but not
the time
im still
[EMAIL PROTECTED] wrote:
I have something like this:
?php
$query = mysql_query(
SELECT col_1, col_2
FROM table
);
$result = mysql_fetch_array($query);
if ($result['col_1'] == 'value_1')
{
// do something
}
if ($result['col_2'] == 'value_2')
{
Maybe it is the tiny extra time to parse the unnecessary LIMIT 1?
-Original Message-
From: Robert DiFalco [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 29, 2006 10:09 AM
To: mysql@lists.mysql.com; [EMAIL PROTECTED]
Subject: RE: Performance: LIMIT 1 with UPDATE
FWIW, my
Yeah, seems like for a uniquely index column expression that the LIMIT 1
provides no benefit (which seems like a logical conclusion). The
performance on a large data set with both approaches is close enough to
call equivalent.
-Original Message-
From: Rick James [mailto:[EMAIL PROTECTED]
Why do you want to use a switch in this particular instance. You're
comparing apples and oranges (in this case, col_1 and col_2). You use
swithc to evaluate one variable against a number of choice, not multiple
variables against variable choices.
I'm not comparing apples and oranges - just
You tried the date_format function of mysql?
Roberto William Aranda-W Roman [EMAIL PROTECTED] escreveu na
mensagem
news:[EMAIL PROTECTED]
hello
i'm developing a program on visual.net 2003 where i need to extract data
from a date time format column
working with mysql.net component for extract
[EMAIL PROTECTED] wrote:
Why do you want to use a switch in this particular instance. You're
comparing apples and oranges (in this case, col_1 and col_2). You use
swithc to evaluate one variable against a number of choice, not multiple
variables against variable choices.
I'm not
Hello Ian barnes
I hope this query will resolve your problem if my understanding is correct
SELECT code1,
SUM(bytes) as sumofbytes,
MAX(bytes) as maximum,
MIN(bytes) as minimum,
COUNT(bytes) as bytecount,
SUM(duration) as duration,
AVG(bytes) as averagebyte
FROM mytable where code1'none' and
This is not necessarily SQL Specific, but it will impact my MySQL
application.
Using the zip code, how can you determine what's in a (say) 50 mile radius.
In other words, if I'm looking for schools within a 50 mile radius of my
location (Zip Code 33881), How can I determine this by the zip
This is not necessarily SQL Specific, but it will impact my MySQL
application.
Using the zip code, how can you determine what's in a (say) 50 mile radius.
In other words, if I'm looking for schools within a 50 mile radius of my
location (Zip Code 33881), How can I determine this by the zip
On 8/29/06, Jesse [EMAIL PROTECTED] wrote:
This is not necessarily SQL Specific, but it will impact my MySQL
application.
Using the zip code, how can you determine what's in a (say) 50 mile radius.
In other words, if I'm looking for schools within a 50 mile radius of my
location (Zip Code
Jesse wrote:
This is not necessarily SQL Specific, but it will impact my MySQL
application.
Using the zip code, how can you determine what's in a (say) 50 mile
radius. In other words, if I'm looking for schools within a 50 mile
radius of my location (Zip Code 33881), How can I determine
On Tue, 2006-08-29 at 16:30 -0400, Jesse wrote:
Does anyone have any ideas?
One technique is to calculate set distances (5,10,25,50) between the zip
codes in advance and stick the results in a table.
Enjoy,
Ed
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
That (using the zip code digits) won't work. Zip codes are assigned by
population density, not by distance. A big city might have several zip
codes, although they'd all likely have the same first three digits, but
check Manhattan for an example.
In our area, the core city (Hartford) and some of
Jesse,
Back around 1995-1996 I built a VB app with an Access database that would do
much of what you want - it was for shipping and terminal locations - then
ported it over to ASP SQL Server a year or two later. I found several raw
data files, either CSV or TSV, which were pretty easily
Dear Sir:
I have some problems with mysql 5.0 binary source in Linux(RedHat).I'm
able to startup the mysql process.
But when i type in :mysql -u root -h localhost -p, and then put the
correct password, I can not enter the database.
I took almost one week to deal with this
On 8/3/06, Penduga Arus [EMAIL PROTECTED] wrote:
On 8/1/06, Chris [EMAIL PROTECTED] wrote:
Did you look at the link David sent you?
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
thanks.. I manage to do that.. below is my solution. please advice if
there is any better
李彦 wrote:
Dear Sir:
I have some problems with mysql 5.0 binary source in Linux(RedHat).I'm
able to startup the mysql process.
But when i type in :mysql -u root -h localhost -p, and then put the
correct password, I can not enter the database.
I took almost one week to
You have a table containing birthdates (date field, including year)
and you want to display all rows for which the birthday will occur in
the next week (seven days).
You tried this query:
SELECT a017namaper, DATE_FORMAT(a017tkhlahir, '%e/%c/%Y') as
a017tkhlahir,
MONTH(a017tkhlahir) as
36 matches
Mail list logo