Re: Convert unix time to 12:00 AM of that same day

2011-03-01 Thread Bryan Cantwell
That's closer: SELECT UNIX_TIMESTAMP() + 86400 - (UNIX_TIMESTAMP() % 86400); Gives me 6:00 PM today... On 03/01/2011 12:32 PM, Singer X.J. Wang wrote: SELECT unix_timestamp() + 86400 - (unix_timestamp() % 86400); -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/m

Re: Convert unix time to 12:00 AM of that same day

2011-03-01 Thread Bryan Cantwell
PM, Singer X.J. Wang wrote: http://en.wikipedia.org/wiki/Midnight On Tue, Mar 1, 2011 at 13:00, Singer X.J. Wang <mailto:w...@singerwang.com>> wrote: That's cause there's two midnights.. use = 1298999201 + 86400 + (1298999201 % 86400) On Tue, Mar 1, 2011 at 12

Re: Convert unix time to 12:00 AM of that same day

2011-03-01 Thread Bryan Cantwell
It was of course a typo, and even with the correct number isn't the answer On 03/01/2011 11:47 AM, Claudio Nanni wrote: You can start by using 60*60*24=86400 ;) On Mar 1, 2011 6:17 PM, "Bryan Cantwell" <mailto:bcantw...@firescope.com>> wrote: > I'd as

Convert unix time to 12:00 AM of that same day

2011-03-01 Thread Bryan Cantwell
I'd asked before how to convert a unix timestamp to the hour that it is in (and got the perfect answer) : 1298999201 = 3/1/2011 11:06:41 AM (1298999201 - (1298999201 % 3600)) = 3/1/2011 11:00:00 AM Now getting the timestamp converted to midnight of that same day isn't as simple as: 1298999201

Re: Get date from unix_timestamp only up to the hour

2011-02-24 Thread Bryan Cantwell
Yes perfect! Thanks, I knew I was over thinking this. On 02/24/2011 10:56 AM, Nathan Sullivan wrote: Bryan, Maybe something like this would work? select 1296158500 - (1296158500 % 3600) Hope that helps, Nathan On Thu, Feb 24, 2011 at 08:41:58AM -0800, Bryan Cantwell wrote: How would I go

Get date from unix_timestamp only up to the hour

2011-02-24 Thread Bryan Cantwell
How would I go about modifying a unix timestamp to actually represent the 'top of the hour' that it represents? For instance: 1296158500 = 1/27/2011 2:01:40 PM That is in the 2:00 pm hour, how can I find that out and modify it to 1296158400 which = 1/27/2011 2:00:00 PM? -- MySQL General Mai

Super active table optimization

2011-02-19 Thread Bryan Cantwell
I have an innodb table with 200 million rows and growing. It is a highly active table with tons of inserts and updates at all times. I notice a select query I test on that table is 0.01 seconds or less when all the inserts/updates are OFF. But when I throttle up the writes to the table, the selec

RE: Any way to change timezone WITHOUT mysqld restart?

2010-10-02 Thread Bryan Cantwell
work in spite of what the manual says. On Fri, 2010-10-01 at 15:42 -0700, Daevid Vincent wrote: > Did you even look at the manual? > > http://lmgtfy.com/?q=mysql+set+timezone > > First link. > > > > -Original Message- > > From: Bryan Cantwell [mailto:b

Any way to change tinezone WITHOUT mysqld restart?

2010-10-01 Thread Bryan Cantwell
Any way to change timezone WITHOUT mysqld restart? It would be a lifesaver if there were some way for me not to have to restart because if mysql restarts then I have to go through a lot of other issues with my other apps.

How can I make mysql manager wait longer for mysql to stop

2010-09-28 Thread Bryan Cantwell
I'm using mysql 5.0.51a (yes I know it's old but I cannot upgrade at the moment) on linux. My challenge is that mysql admin does not wait long enough for mysql database(s) which are all innodb and VERY large (billions of rows) and eventually just kills the db. This causes innodb to try and repair

Get max ID of each item in a list

2010-09-10 Thread Bryan Cantwell
I have a simple table mytable id int time_stamp tiemstamp value int tid int I want to find the max id for each individual tid in my table. if I did it one by one it would be: select max(id) from mytable where tid = 12345; but how can I do something more like: select concat(tid,':',id) from my

Re: Reduce dataset but still show anomalies

2010-08-20 Thread Bryan Cantwell
Yes, but I DON'T want eh spikes smoothed out On Fri, 2010-08-20 at 17:16 +0200, Jangita wrote: > On 20/08/2010 5:12 p, Bryan Cantwell wrote: > > I am trying to produce charts for large amounts of data. I already limit > > the user to a smaller time frame in order to redu

Reduce dataset but still show anomalies

2010-08-20 Thread Bryan Cantwell
I am trying to produce charts for large amounts of data. I already limit the user to a smaller time frame in order to reduce the possible data points, but still can end up with far more data points than are clearly plottable on a chart. Does anyone have an idea of how I can drop insignificant poin

Replication: ignore specified columns?

2010-07-23 Thread Bryan Cantwell
I know that you can ignore certain databases and tables in mysql replication, but is it possible to replicate all but a certain column or two from a table? This is 5.1.48 on linux. Thanks, Bryancan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Archive data from a single partition

2010-07-23 Thread Bryan Cantwell
I have a very large table (over 2 billion rows) which is partitioned by day. I'd like to archive all the data in the oldest partition to another table before I drop that partition. Is there some way other than a simple select statement that has parameters that match those of the partition whic will

Select ROW_COUNT() INTO a variable

2010-07-19 Thread Bryan Cantwell
I have a stored procedure in mysql 5.1.48 that deletes old data from my tables. I would like to keep a running count while it does this. Here is what I try now: ... DECLARE dropCnt INT DEFAULT 0; ... SET @sql = CONCAT('DELETE FROM myTable WHERE itemid = ', iID, ' AND clock BETWEEN 0 AND ', histUni

deletes from a VERY large table

2010-07-16 Thread Bryan Cantwell
I have to delete old records from a very large table (1.6billion rows) in a stored procedure. CREATE TABLE mytable( id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, unix_time INT(11) NOT NULL DEFAULT 0, value DOUBLE (20, 4) NOT NULL DEFAULT 0., UNIQUE INDEX history_1 USING BTREE (id, unix_ti

combined or single indexes?

2010-07-06 Thread Bryan Cantwell
Is there a benefit to a combined index on a table? Or is multiple single column indexes better? If I have table 'foo' with columns a, b, and c. I will have a query like: select c from foo where a in (1,2,3) and b < 12345; Is index on a,b better in any way than an a index and a b index? An explain

Fancy partitioning scheme

2010-06-02 Thread Bryan Cantwell
Perhaps someone has already accomplished this: I have a simple table with 3 columns: mytable( myid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, myunixtime INT(11) NOT NULL DEFAULT 0, myvalue BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 ) It is collecting millions of rows. The myunixtime column is a un

First and Last timestamp of the day/week / month

2010-04-22 Thread Cantwell, Bryan
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? SEL

RE: Index analyser

2010-02-23 Thread Cantwell, Bryan
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, 2010

Index analyser

2010-02-23 Thread Cantwell, Bryan
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?

dynamic sql using INTO

2010-02-17 Thread Cantwell, Bryan
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 wit

RE: compare column value to anything in a list of values

2010-02-17 Thread Cantwell, Bryan
..@optonline.net [dryd...@optonline.net] Sent: 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 Messag

compare column value to anything in a list of values

2010-02-17 Thread Cantwell, Bryan
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 ('apple','orange','banana'); and say value may = something like 'produce(grape,orange,pear,apple,lettuce)' -- MySQL General Mailing List For list a

file per table performance

2010-01-12 Thread Bryan Cantwell
Anyone have information they can provide on the performance hit of using innodb_file_per_table? I'd assume that since there are many individual tables that this would slow performance, but perhaps not. In a huge database, is this not a good idea, or a better one? -- MySQL General Mailing List

Lesser of two values in list

2009-12-17 Thread Cantwell, Bryan
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? -

Return row even if nothing found

2009-12-15 Thread Cantwell, Bryan
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 ifnull

Use stored proc result set from another stored proc without temp table?

2009-12-09 Thread Bryan Cantwell
I have a stored proc I need to call from yet another stored proc, which then needs to use the results from the called proc ... I could probably use temp table but really dont want to do that unless absolutely required. I cant use OUT parameters, because the called stored proc returns multiple r

Mysql version of database link?

2009-12-07 Thread Bryan Cantwell
Does anyone have a suggestion on how a database link (like in Oracle) could be established between two Mysql databases on different servers? It would be awesome if I could write sql that will query both databases in one query... -- MySQL General Mailing List For list archives: http://lists.mys

How can I know if Mysql Crashed or stopped gracefully

2009-10-27 Thread Bryan Cantwell
I have an environment where upon boot of a machine I need to know if mysql shutdown nicely or if it crashed. How can I know for sure which was the case so that I can take action if needed? I notice that issuing a reboot or shutdown -r now command, (in Linux) that the 'service mysql stop' is nev

Re: Mysql service will not stop

2009-10-14 Thread Bryan Cantwell
...@eds.com Pager mail:9884430...@nma.vodafone.in -Original Message- From: Bryan Cantwell [mailto:bcantw...@firescope.com] Sent: Wednesday, October 14, 2009 8:40 PM To: mysql@lists.mysql.com Subject: Mysql service will not stop I have mysql 5.0.51a running on a linux 2.6.26 box. The service

Mysql service will not stop

2009-10-14 Thread Bryan Cantwell
I have mysql 5.0.51a running on a linux 2.6.26 box. The service my6sql stop command fails and all that appears in the log or err log is the following... what can I do to repair this? 091014 17:00:24guardian: instance 'mysqld' is running, set state to STARTED. 091014 17:07:40The instanc

Re: Replication recovery

2009-10-07 Thread Bryan Cantwell
easy to detect and repair with a daemon script. Even if both machines die, it'll be a similar scenario. Regards, Gavin Towey -Original Message----- From: Bryan Cantwell [mailto:bcantw...@firescope.com] Sent: Wednesday, October 07, 2009 10:47 AM To: mysql@lists.mysql.com Subject: R

Replication recovery

2009-10-07 Thread Bryan Cantwell
I have 2 - 5.0.51a mysql databases setup in a dual master scenario. A is master of B and vise versa... In Linux 2.6.26 (if that matters). Everything is great while all is running normally. But, when I am testing the system by creating disasterous scenarios, I find some challenges I hope to get

RE: Replication recovery on restart

2009-07-31 Thread Cantwell, Bryan
- 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 tha

RE: Replication recovery on restart

2009-07-31 Thread Cantwell, Bryan
ssage- 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 recovery on restart

2009-07-30 Thread Cantwell, Bryan
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 the

Replication switch Master to slave and back

2009-07-08 Thread Cantwell, Bryan
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 ma

Create function ignore deps

2009-05-27 Thread Cantwell, Bryan
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 suc

Index time columns?

2009-04-24 Thread Cantwell, Bryan
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...

Re: Replica questions

2009-03-12 Thread Bryan Irvine
that do I then need to re-run the "set master to" statements when the slave comes back up? or can that be handled automatically? -Bryan On Thu, Mar 12, 2009 at 10:26 AM, Rob Wultsch wrote: > When you start up replication the data should be recorded in the > master.inf

Re: Replica questions

2009-03-12 Thread Bryan Irvine
Do I jsut need to monitor better and manually add it should the log and pos change? -Bryan On Wed, Mar 11, 2009 at 7:05 PM, Baron Schwartz wrote: > That's deprecated too :-) > > On Wed, Mar 11, 2009 at 9:17 PM, Cui Shijun wrote: >> hi, >>  #2.  try adding the informa

Replica questions

2009-03-11 Thread Bryan Irvine
manually add it back in with the change master to ... command. TIA -Bryan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Size limitation of user variable?

2009-02-10 Thread Cantwell, Bryan
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: http://lists.mysql.com/

Re: replication of databases

2008-12-23 Thread Bryan Irvine
--+ >> | mysql-bin.000122 | 98 | mysql| | >> +--+--+--+--+ >> 1 row in set (0.00 sec) > > You need to read up on what binlog_do_db means. And you shouldn't use > it. It is the problem. > Indeed it was a gap in my understanding. That did the trick! Many than

Re: replication of databases

2008-12-22 Thread Bryan Irvine
On Sun, Dec 21, 2008 at 8:35 AM, Baron Schwartz wrote: > Hi Bryan, > > On Wed, Dec 17, 2008 at 5:35 PM, Bryan Irvine wrote: >> I've got a master-master set up and I'm trying to figure out the best >> way to add new databases to the cluster. I've not set any

replication of databases

2008-12-17 Thread Bryan Irvine
licated as well? (it's not working for me if it is). I've read the docs but didn't find what I was looking for, apologies if is this covered elsewhere. -Bryan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Function call reult in a WHERE-IN clause

2008-12-17 Thread Cantwell, Bryan
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 BIGINT(2

create single resultset from multiple sets

2008-12-02 Thread Cantwell, Bryan
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:http://lists

RE: Function returns null when running sql manually works

2008-11-13 Thread Cantwell, Bryan
END IF; SET filterTMP = NULL; END; END IF; UNTIL done END REPEAT; CLOSE cur1; RETURN filterSQL; END$$ DELIMITER ; -Original Message- From: Cantwell, Bryan [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2008 5:13 PM To: mysql@lists.mysql.com Subject: RE:

RE: Function returns null when running sql manually works

2008-11-13 Thread Cantwell, Bryan
ql doesn't 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

Function returns null when running sql manually works

2008-11-13 Thread Cantwell, Bryan
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 obvio

nagios server blocked

2008-09-24 Thread Bryan Irvine
I've got a nagios server that checks to see if the listening port is open. I'm getting this error: Host 'nagios-host' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' I've googled and there's options to use max_connection_errors=100 My (very rough) estimate

Re: recommended high availability setups

2008-08-28 Thread Bryan Irvine
rder to receive it's updates again. I'm not sure if this is the best way or not. Do you use the drbd method? Are any of these things accounted for in that solution? -Bryan On Thu, Aug 28, 2008 at 2:06 PM, Jimmy Guerrero <[EMAIL PROTECTED]> wrote: > Hello, > > It isn't

Re: recommended high availability setups

2008-08-28 Thread Bryan Irvine
rder to receive it's updates again. I'm not sure if this is the best way or not. Do you use the drbd method? Are any of these things accounted for in that solution? -Bryan On Thu, Aug 28, 2008 at 2:06 PM, Jimmy Guerrero <[EMAIL PROTECTED]> wrote: > Hello, > > It isn't

recommended high availability setups

2008-08-28 Thread Bryan Irvine
ased off of the line numbers/binlog correct? And adding a new DB requires reloading the MySQL server? I've been looking around at other technologies as well like linux-ha. What are other people using for systems that have to be up 100% of the time but aren't complete nightmares to manage? T

Re: slave io status: no wont' change

2008-07-28 Thread Bryan Irvine
n the slave and see if it starts. > > If it doesn't I'd take a fresh mysqldump with the --master-data > parameter and refresh the slave, run the 'change master' statement at > the top of the backup and it should start. > > -Original Message- > From: Bry

Re: slave io status: no wont' change

2008-07-28 Thread Bryan Irvine
98 | exampledb| | +--+--+--+--+ 1 row in set (0.00 sec) ^^^is that the correct posistion? -Bryan On Mon, Jul 28, 2008 at 2:05 PM, Mike <[EMAIL PROTECTED]> wrote: > Do you have the original mysql> show sla

Re: slave io status: no wont' change

2008-07-28 Thread Bryan Irvine
start from position Exec_Master_Log_Pos 1? Can you tell us the > command you used to get this going? > > Mike > > On Mon, Jul 28, 2008 at 4:14 PM, Bryan Irvine <[EMAIL PROTECTED]> wrote: >> >> I

slave io status: no wont' change

2008-07-28 Thread Bryan Irvine
I'm having an issue setting up a slave Where it doesn't seem to start: mysql> show master status; +--+--+--+--+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +--+--+--+--+ |

Debug Stored Proc

2008-05-06 Thread Bryan Cantwell
Is there no way to step thru a stored proc in order to debug it and see what it is doing? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

create cursor from dynamic sql

2008-05-05 Thread Bryan Cantwell
I need to create a cursor using dynamic sql. Below is a short example of what I am trying to use in order to get the correct resultset... ignore the rest of the proc, I just need to know how to make the cursor declaration from @vsql Thanks DELIMITER $$ DROP PROCEDURE IF EXISTS `firescope`.`trigg

mysql configure arguments

2008-02-21 Thread Bryan Irvine
Is there a way to find out what configure arguments were used during compile time? -Bryan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Crashed InnoDB

2008-02-13 Thread Bryan Cantwell
on for your distribution on how to do that. Number of processes running now: 0 From: Dan Rogart [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 12:27 PM To: Bryan Cantwell; mysql list Subject: Re: Crashed InnoDB Have you tried starting mysqld with innodb_force_r

RE: Crashed InnoDB

2008-02-13 Thread Bryan Cantwell
No input on this one? -Original Message- From: Bryan Cantwell [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 12, 2008 11:51 AM To: mysql@lists.mysql.com Subject: Crashed InnoDB We had a power outage, now the mysql wont start at all. Here is the err file output... Any help on how to

Crashed InnoDB

2008-02-12 Thread Bryan Cantwell
We had a power outage, now the mysql wont start at all. Here is the err file output... Any help on how to recover? 080212 11:35:50 mysqld started 080212 11:35:50 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd fi

Mysql innodb commandline check and repair

2007-10-01 Thread Bryan Cantwell
I have Mysql 5.0.45 using innodb tables. Occasionally, I get corrupted tables. I can go into Mysql administrator gui and see the bad table and I can repair the index or whatever is wrong from the gui. I need a command line way to periodically detect for issues and if it finds one the I need a comma

Ugly sql optimization help?

2007-09-25 Thread Bryan Cantwell
I have the following horrible sql. I need one result that has all the data in one row. I am currently using 3 sub queries and figure it must be a better way... SELECT 'FS_DEV', ifnull(a.severity, 0) AS aseverity, ifnull(a.

dynamic sql in proc

2007-06-28 Thread Bryan Cantwell
I have the following proc... when I run it I get a response that says "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1". I just want a programatic way to upgrade db engine to innodb where I don't

RE: string to timestamp conversion

2007-05-21 Thread Bryan Cantwell
I see no string to date function that does this conversion... -Original Message- From: Bryan Cantwell Sent: Monday, May 21, 2007 2:08 PM To: MySQL General Subject: string to timestamp conversion I have a table with a varchar column that contains a timestamp like this: 'Thu May

string to timestamp conversion

2007-05-21 Thread Bryan Cantwell
I have a table with a varchar column that contains a timestamp like this: 'Thu May 17 09:15:47 2007' I need to grab this and include it in an insert sql that puts that value in a table as a timestamp... -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

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 =

RE: Need sql optimization help

2007-03-03 Thread Bryan Cantwell
day, March 03, 2007 1:40 PM To: Bryan Cantwell Cc: mysql@lists.mysql.com Subject: Re: Need sql optimization help Bryan, A 'Not Exists' query <http://www.artfulsoftware.com/infotree/queries.php#41> is usually faster when coded as an exclusion join, eg for max-some-value per key, left

Need sql optimization help

2007-03-03 Thread Bryan Cantwell
I have the following sql that works for what I want to see but is terribly slow due to the subquery. Any suggestions on how to get same result faster? I have tried group by and cant seem to get the correct results that way Also is there a product that can help optimize sql and indexing? SELEC

return all dates between two dates

2007-02-26 Thread Bryan Cantwell
055 06:01 AM0.02 2/24/2007 06:02:02055 06:02 AM0.08 Bryan Cantwell Director, Development (M) 469.361.1272 [EMAIL PROTECTED] www.FireScope.net

Re: MySQL Daylight Savings Time Patch

2007-02-21 Thread Bryan S. Katz
Yes they are; and 22 >= 3 - Original Message - From: "Jerry Schwartz" <[EMAIL PROTECTED]> To: "'Bryan S. Katz'" <[EMAIL PROTECTED]>; Sent: Wednesday, February 21, 2007 10:30 AM Subject: RE: MySQL Daylight Savings Time Patch > Aren&

Re: MySQL Daylight Savings Time Patch

2007-02-20 Thread Bryan S. Katz
rence. Which means that they were never being used. Any ideas? - Original Message - From: "Bryan S. Katz" <[EMAIL PROTECTED]> To: Sent: Tuesday, February 20, 2007 7:50 PM Subject: MySQL Daylight Savings Time Patch > Running 4.1.22, on windows 98, I'm having

MySQL Daylight Savings Time Patch

2007-02-20 Thread Bryan S. Katz
Running 4.1.22, on windows 98, I'm having trouble getting the time zone tables to actually work. I've loaded the tables as per: http://dev.mysql.com/downloads/timezones.html, and followed the diagnostics as per: http://lists.mysql.com/mysql/205115 . It appears that my results from said diagnostic

MySql 5 replacement for computed default column value

2006-01-02 Thread Bryan Cantwell
Trying to migrate to MySql 5 from Sybase asa. I have a tables that have column values that are calculated based on other columns in the table. How can I accomplish the same in MySql?   Here is sample of my asa table: CREATE TABLE "DBA"."OpptyDetail" (     "OpptyDetailID"  

Re: scanning 2 rows slow index fast 26GB MyISAM

2004-12-23 Thread Bryan Heitman
a different query. My point is the only difference is a SELECT locationid must retrieve the results as locationid is not in the index. It should not however take 5 mins to return 2 rows from the table. Bryan - Original Message - From: "Donny Simonton" <[EMAIL PROTECTED]

Re: scanning 2 rows slow index fast 26GB MyISAM

2004-12-23 Thread Bryan Heitman
ULL | | BTREE | | +++--+--+-+---+-+--++--++-+ 5 rows in set (0.00 sec) - Original Message - From: "Sergio Salvi" <[EMAIL PROTECTED]> To: "Bryan He

Re: scanning 2 rows slow index fast 26GB MyISAM

2004-12-23 Thread Bryan Heitman
e`), KEY `myKey2` (`LocationID`) ) TYPE=MyISAM MAX_ROWS=10 AVG_ROW_LENGTH=300 DATA DIRECTORY='/home/imap/fuse3.disk2/SQL/search/' - Original Message - From: "Sergio Salvi" <[EMAIL PROTECTED]> To: "Bryan Heitman" <[EMAIL PROTECTED]> Cc:

Re: Re: scanning 2 rows slow index fast 26GB MyISAM

2004-12-23 Thread Bryan Heitman
| rows | Extra | ++--+---+---+-+---+---+-+ | matrix | ref | myKey | myKey | 9 | const,const,const | 56909 | Using where | ++--+---+---+-+---+---+-+ - Original Message - From: "leo" <[EMAIL

Re: scanning 2 rows slow index fast 26GB MyISAM

2004-12-23 Thread Bryan Heitman
Thanks Leo, However, remember that the key returns quickly on index-only queries, so the conditions in the WHERE are not my delay at this time. I want to know why it takes 5 mins to scan 2 rows from the MYD Bryan - Original Message - From: "Bryan Heitman" <[EMAIL PROTECT

scanning 2 rows slow index fast 26GB MyISAM

2004-12-22 Thread Bryan Heitman
ailbox` varchar(255) default NULL, `body` longblob, PRIMARY KEY (`LocationID`), KEY `myKey` (`LocationID`,`AccountID`,`Date`) ) TYPE=MyISAM MAX_ROWS=10 AVG_ROW_LENGTH=300 DATA DIRECTORY='/home/SQL/' INDEX DIRECTORY='/home/SQL/' Best regards, Bryan Heitman FuseMail T

Re: Mysql and phpBB

2004-04-05 Thread Bryan Heitman
Mark, You may have a corrupt table. I would recommend printing the $query just before mysql_query() is ran. This will give you the query that is failing and the table that it is attempting to write to. May want to try a "check table" on this table. Bryan - Original Message -

Re: InnoDB Deadlock cannot find free slot for undo

2004-04-01 Thread Bryan Heitman
e number/flushed up to numbers. Any help or a point in the right direction in this situation would be helpful Bryan Heitman FuseMail - Original Message - From: "Dathan Vance Pattishall" <[EMAIL PROTECTED]> To: "'Bryan Heitman'" <[EMAIL PROTECTED]>;

InnoDB Deadlock cannot find free slot for undo

2004-03-31 Thread Bryan Heitman
riable = innodb_additional_mem_pool_size=20M set-variable= innodb_log_file_size=256M set-variable= innodb_log_files_in_group=3 Any help would be appreciated. Best, Bryan Heitman [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/my

Slow query with like clause (repost)

2004-03-12 Thread Bryan Coon
Posted this yesterday, but it never showed up...? Hi, I have the following table (sorry if the formatting gets tweaked) and query. The table is around 36k rows long, and the query returns about 350 rows. The query takes 12.15 seconds. Is there any way I can speed this up? Thanks, Bryan

Re: Xserve G5

2004-03-01 Thread Bryan Harris
> Has anyone had any experiences running MySQL on a Xserve G5 with Macintosh > OSX? > > We are thinking of purchasing some new hardware to run our MySQL server. The > 64-bit architecture is something we would like to take advantage of. > > Is this good, bad, otherwise? Any comments would be app

On database structure -- keys and speed

2004-02-22 Thread Bryan Harris
n a names database... Thanks in advance. - Bryan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Replication and Binary Logging

2004-02-11 Thread Bryan Brannigan
e an empty set. I'm sure there is something simple that I've missed... but I can't find any documentation of what it could be. --Bryan

RE: transaction support

2004-01-19 Thread Bryan Koschmann - GKT
Hi Chris, My apologies, I didn't correctly explain what I was looking for. I mean more of a solution to creating a client program. I'm thinking of php-gtk but not sure how well this works under windows, especially for printing reports. Thanks, Bryan On Sat, 17 Jan 2004, C

RE: transaction support

2004-01-16 Thread Bryan Koschmann - GKT
st he sees what MySQL can do) so I'll probably be trying to do it myself. So if anyone knows of a way to get a full interface under windows (that can print nice invoices) and has a direct brain-input for learning, let me know :) Thanks again, Bryan -- MySQL General Mailing Lis

ISP and users

2004-01-16 Thread Bryan Koschmann - GKT
Hello, I run an ISP where our web customers have access to the MySQL server. When they want a database, they request it through me and I add it. I was just curious if this is the common way it is done, or if there is a safe way they can add their own? Thanks, Bryan -- MySQL General

RE: transaction support

2004-01-05 Thread Bryan Koschmann - GKT
ion would be hung and even if rolled back by server admin the money would still be gone from account 32146 --- Is this actually correct, or is it correct but there is a different way to do this with MySQL? Thanks, Bryan -- MySQL General Mailing List For list a

transaction support

2004-01-05 Thread Bryan Koschmann - GKT
ue this I would really appreciate it. Thanks, Bryan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: ?? .tcshrc On OS X ??

2003-12-09 Thread Bryan Harris
> .tcshrc is the config file for your settings on the environment variables > for your session of tcsh. When your looking for $SHELL your looking for the > command line interpretor. FreeBSD can use most any of them. bash, csh, ksh,, > sh, tcsh, etc. Usually the .rc file is found in your home dire

Re: ?? .tcshrc On OS X ??

2003-12-09 Thread Bryan Harris
> I had tips from some people here to install the complete MySQL from Server > Logistics > on my Mac OS X 10.2 and so I did (I also installed Apache 2 and PHP from > them). > Now I'm on Step one, but got stuck here. (I always get stuck while trying > this MySQL). > > In the pdf-file that came a

  1   2   >