I need to be able to get a first and last timestamp for a day a week or a
month. I have an example of what I did so far that gets me that info for a
week... but I fear that it is far more complex than it needs to be. Anyone
have a simple way to get first and last timestamp for these intervals?
Is there still no such thing anywhere for Mysql as an index analyser?
Many others have such a thing that will sit and monitor db activity over a
poeriod of time and suggest the exact indexes on each table based on what it
has seen to improve performance
Anyone got that for MySQL?
Ya, that one is helpful... just trying to land on a solution like I've seen in
other DB's that have index-advisor that listens and creates what it thinks is
the perfect indexes ... but thx...
From: mos [mo...@fastmail.fm]
Sent: Tuesday, February 23,
Is there a simple function or method to compare a value in a column to one or
more items in a comma separated list?
select * from table where value contains one of ('apple','orange','banana');
and say value may = something like 'produce(grape,orange,pear,apple,lettuce)'
--
MySQL General Mailing
: Wednesday, February 17, 2010 11:31 AM
To: Cantwell, Bryan
Subject: Re: compare column value to anything in a list of values
yes, there is... IN
SELECT * FROM tbl WHERE col IN (v1, v2, v3)
- Original Message -
From: Cantwell, Bryan
Date: Wednesday, February 17, 2010 12:25 pm
Subject
I have a function built that will get me X percentile from my history table for
last X days. It works fine as long as I hard code the certain values in where
they go... what I really need to know is how can I make dynamic sql still do a
select into a variable? simply replacing the '31' below
I need to find the lesser of two values provided in a list. I know I can do it
with a couple of IF's in a function, but I'd really like to know if there is
already a function that I can use.
min(12,3,1,4) of course doesnt work, but is there some other math function I
am overlooking in MySql?
I have a situation where I need to always get a row returned even if no match
is in the table (only 1 or many rows are acceptable).
I can use:
select a, b, c from mytable where a = 'yarp';
and might get 20 rows if there are matches, but I at least need 1 default row
back...
using :
select
-
From: Gavin Towey [mailto:gto...@ffn.com]
Sent: Thursday, July 30, 2009 5:08 PM
To: Cantwell, Bryan; mysql@lists.mysql.com
Subject: RE: Replication recovery on restart
Hi Bryan,
Please define out of whack. Tell us exactly what you're doing when you
restart, and what the replication state
-
From: Gavin Towey [mailto:gto...@ffn.com]
Sent: Friday, July 31, 2009 1:21 PM
To: Cantwell, Bryan; mysql@lists.mysql.com
Subject: RE: Replication recovery on restart
Bryan,
How are you restarting mysql? In the case a master crashes, it's definitely
common for the slave to miss the fact
I have 2 machines 'master' and 'slave'. I have the mysql 5.0.51a-log databases
both replicating wonderfully. They are configured in a dual master scenario so
that one can take over for the other in my HA environment I've built. All is
working great until... If one or the other box reboots or
I have successfully set up a replication master/slave scenario with my MySQL
5.0.51a
Now in the event of a fail over to the slave (an identical appliance), I want
the old master to become the slave for an eventual switch back the other way.
Would it really take the same process to keep the old
I want to check all my functions and procs into my svn as individual sql files.
When I use these to create my db, the person doing this may not realize the
correct order to run these files and not have dependency challenges... How can
I have procs that depend on functions, or vice versa, get
I have a debate with someone about indexes on time columns.
So I ask the community, should you put an index on a timestamp column of a
table?
Thanks...
I am trying to put the result of a function that returns MEDIUMTEXT into
a user variable in my procedure. I haven't attempted to push the limits
of the MEDIUMTEXT size, but wonder if the user variable can even handle
this?
--
MySQL General Mailing List
For list archives:
I have a function that I built that returns a string that is really a
comma separated list of values (below). I would like to use that
returned value in an IN clause in sql. :
select * from hosts where hostid in (getHosts(10014));
The function:
CREATE FUNCTION getUserHosts(userID
I have a procedure (proc1) that calls another procedure (proc2) several
times.
I'd like to make proc1 return the proc2 results in a single resultset.
How can this be done in mysql 5.0.51?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
Below I have a function with a cursor. I have tested the cursor sql
manually and it is fine, I have put the variables into the sql inside
the cursor loop and it returns data too, BUT, executing this function
returns null even though I know the correct info is available. Am I
missing something
return a record in this pass?
thx
-Original Message-
From: Cantwell, Bryan [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2008 4:17 PM
To: mysql@lists.mysql.com
Subject: Function returns null when running sql manually works
Below I have a function with a cursor. I have tested
Message-
From: Cantwell, Bryan [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2008 5:13 PM
To: mysql@lists.mysql.com
Subject: RE: Function returns null when running sql manually works
OK, I know WHY it is returning null, just not WHAT to do about it.
In the inside sql
20 matches
Mail list logo