Re: how to define the correct index

2009-06-16 Thread Olaf Stein
I would create two separate indices on fields B and C Olaf On 6/16/09 4:25 AM, "Yariv Omer" wrote: > Hi > > I have the following problem > > I have a table with 3 fields ('Field_A', 'Field_B', 'Field_C') > My query is: > > Select Field_A from table where Field_b=10 order by Field_c ASC; >

Re: Unix compress equivalent

2009-05-11 Thread Olaf Stein
1 | > +--+--+------- > ---+-+ > 3 rows in set (0.04 sec) > > > Cheers, > -Janek > > On Fri, 2009-05-08 at 12:29 -0400, Olaf Stein wrote: >> Hi all >> >> What is th

Re: Unix compress equivalent

2009-05-08 Thread Olaf Stein
Or even better, can I tell load data infile or somewhere in the table definition to compress whatever is written to the file? Thanks Olaf On 5/8/09 12:29 PM, "Olaf Stein" wrote: > Hi all > > What is the equivalent in unix (more specifically python) to the compress() &g

Unix compress equivalent

2009-05-08 Thread Olaf Stein
Hi all What is the equivalent in unix (more specifically python) to the compress() function. I am trying to make csv file for use with load data infile and am wondering how to compress the strings that I would usually compress with compress() in a regular sql statement. The field I am writing thi

Re: learning mysql

2009-03-25 Thread Olaf Stein
If you know in theory what you want to do then I recommend the certification study guide http://www.mysql.com/certification/studyguides/ olaf On 3/24/09 9:00 PM, "solarflow99" wrote: > hi, I'm looking for some advice where to learn mysql. Not being a DBA, I > have basic knowledge of database

Re: Cost of using over dimensioned columns

2009-02-25 Thread Olaf Stein
Morten, Check out http://dev.mysql.com/doc/refman/5.1/en/storage-requirements.html For example, the cost of longtext (L+4 bytes) over mediumtext (L+3 bytes) is 1 byte per record. If you have a lot of records this might be significant. In the case of varchar it is similar, L+1 if less than 255 by

Re: Left join does not work with Count() as expected

2009-02-19 Thread Olaf Stein
You need to group by forum_id... On 2/19/09 11:09 AM, "Artem Kuchin" wrote: > I have two simple tables. One - list of forums, second - list of > messages and i want to > get the list of forums with number of messages in each. > > Here is the query: > > SELECT forums.id , COUNT( forum_msg.id )

Re: what is best upgrade plan for large, replicating database?

2009-02-16 Thread Olaf Stein
Jim, In my experience updating the binaries (or installing the new ones in addition to the old ones) works fine as long as you have made sure there are no incompatible changes. I have done this from 5.0 to 5.1 without any issues. Just run mysql_upgrade and you should be fine. I have never had to

Re: db setup - correction

2009-02-09 Thread Olaf Stein
> From the looks of things I have to create some kind of php input > function or group of functions to come up with a page with the fields > necessary to enter all the data and then store the data in mySql. And to > retrieve the information its a heap of functions to gather and p

Re: db setup - correction

2009-02-09 Thread Olaf Stein
mallint, etc...) > > Now one book with multiple authors has one books_authors row for each of > its authors, and you retrieve book & author info with a simple join. > > PB > > - > > PJ wrote: >> Olaf Stein wrote: >> >>>

Re: db setup - correction

2009-02-09 Thread Olaf Stein
Just about the authors You need a separate table for them and then an table linking authors and books. So you have table books, authors and rel_books_authors where rel_books authors has 3 entries for a book with 3 authors just using the book id and the author is's Olaf On 2/9/09 10:25 AM, "PJ"

Re: db setup

2009-02-09 Thread Olaf Stein
Just about the authors You need a separate table for them and then an table linking authors and books. So you have table books, authors and rel_books_authors where rel_books authors has 3 entries for a book with a authors just using the book id and the author is's Olaf On 2/9/09 10:25 AM, "PJ"

Re: like isn't behave as expected

2009-02-04 Thread Olaf Stein
ct cpe_id from cpe_users where > cpe_id = 'dd' >> I do get the one result > why? > > Thanks, Yariv > - Olaf Stein DBA Battelle Center for Mathematical Medicine Nationwide Children's Hospital, The Research Institute 700 Children&#x

Re: questions about merging

2009-01-30 Thread Olaf Stein
ogic separation / phisical different > folders) > > You can have all the databases you want in MySQL, > > they are just logical separation between tables, > > and with MyISAM tables also phisical separation thru folders. > > cheers > > Claudio > > >

Re: about tables

2009-01-06 Thread Olaf Stein
Use the first option (1 table) and index column place Olaf On 1/5/09 4:42 PM, "Ahmet DÜLGAR" wrote: > > hi everyone > my question is about tables > i have lots of records > i want to learn that if i slip my record. are the select run more fast > for example > table1 > name surname place > aaa

Re: Binlog error

2009-01-05 Thread Olaf Stein
e tried few days ago to repeat the bug as you described it but I was not > able. > Please try to submit a bug report at bugs.mysql.com with all the necessary > info to repeat the bug. > > Regards, > Santo Leto. > > -- > F

Re: Binlog error

2009-01-05 Thread Olaf Stein
Baron Schwartz" wrote: > I suspect a bug, honestly. Have you searched bugs.mysql.com? Have > you submitted a bug report? > > On Wed, Dec 31, 2008 at 9:01 AM, Olaf Stein > wrote: >> Hi all, >> >> As my query yesterday did not generate any responses (pos

Binlog error

2008-12-31 Thread Olaf Stein
Hi all, As my query yesterday did not generate any responses (possibly it was too long and maybe not well written) I am trying to simplify the query: What does the following error mean: ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 173056, event_type: 73 And what is the u

Re: Changing columns descriptions...

2008-12-30 Thread Olaf Stein
Just use the same type as the column already has... Olaf On 12/30/08 12:40 PM, "Carlos Savoretti" wrote: > Hi all: > > Is it possible to change a column description > _without_ having to reset its type ? It is, > I has not to change its type, just its comment ... > > Example: > ALTER TABLE p

Trigger causes error in binlog

2008-12-30 Thread Olaf Stein
Hi all, I am having some issues with my replication setup which I have narrowed down to being a problem on the master, more specifically an issue with the binlog when using a trigger. I have a trigger on one of my tables that archives an entry before deleting it: DELIMITER // CREATE TRIGGER d_ad

Pid file issue

2008-12-12 Thread Olaf Stein
Hi all, I just rebooted one of my servers and get the following error when trying to restart the mysql daemon: Starting MySQLManager of pid-file quit without updating[FAILED] The server shut down fine and that is when the pid file should have gone away. Any ideas? This is from the error log

Re: Server Setup Question

2008-11-12 Thread Olaf Stein
I have no links but the best way of tuning linux is to only install what you actually need. Standard installer like to install all kinds of deamons and other programms you might not need on db server ... On 11/12/08 2:20 PM, "Shain Miley" <[EMAIL PROTECTED]> wrote: > Thanks a lot for all the in

Re: Rotate regular log file only

2008-10-23 Thread Olaf Stein
d to us recently when we moved the log directory and > didn't update the log index.) > > At 2am our backup system runs the mysqldump script with the extra > parameter --flush-logs. This causes MySQL to rotate the log it's using, > and as you found out, all slaves respond t

Re: Rotate regular log file only

2008-10-23 Thread Olaf Stein
---BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Olaf Stein schrieb: >> Hi all >> >> Is it possible to rotate just the regular (--log) log file? > > I am not sure if it will be safe, but maybe with logrotate and for > /var/log/mysqld.log the "copytruncate"

Rotate regular log file only

2008-10-23 Thread Olaf Stein
Hi all Is it possible to rotate just the regular (--log) log file? If I do flush-logs I have to tell my slaves that (at least I have done so in the past, maybe I don't and the slves realizes by itself?) Thanks Olaf - Confidentiality Notice: The following m

Re: Stored proc - dynamic sql in cursor

2008-10-17 Thread Olaf Stein
;>>>> > >>>>> > >> > What does work is using prepared statements: >>>>>>>>>>> > >>>>> > >> > >>>>>>>>>>> > >>>>> > >> >

Re: Stored proc - dynamic sql in cursor

2008-10-16 Thread Olaf Stein
E show_pheno(agpfid INT) >>>>> > >> > READS SQL DATA >>>>> > >> > SQL SECURITY INVOKER >>>>> > >> > COMMENT 'shows phenotypes for given family id' >>>>> > >> > BEGIN >>>>

Re: Stored proc - dynamic sql in cursor

2008-10-16 Thread Olaf Stein
Oct 16, 2008 at 12:31 PM, Olaf Stein > <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> I am running into some issues with what I am trying to do in a stored proc. >> Basically I am trying to find records related to certain individuals in >> other tabl

Re: Stored proc - dynamic sql in cursor

2008-10-16 Thread Olaf Stein
;> > >> > >> > - Confidentiality Notice: >> > The following mail message, including any attachments, is for the >> > sole use of the intended recipient(s) and may contain confidential >> > and privileged

Re: Stored proc - dynamic sql in cursor

2008-10-16 Thread Olaf Stein
OSE tnames; >> > END; >> > >> > END // >> > >> > >> > - Confidentiality Notice: >> > The following mail message, including any attachments, is for the >> > sole use of the inte

Stored proc - dynamic sql in cursor

2008-10-16 Thread Olaf Stein
Hi all, I am running into some issues with what I am trying to do in a stored proc. Basically I am trying to find records related to certain individuals in other tables in the databases and if there are any, tell me how many. Instead of doing this for each of these tables individually I use a cur

MyISAM optimize

2008-10-15 Thread Olaf Stein
Hi All, Just some simple questions I am somehow not able to find an answer to. - Does "optimize table tablename" do the same thing as mysqlcheck [options] db_name [tables] ? - Do they take care of large chunks of deleted data? - and I am assuming optimize table would replicate, mysqlcheck I wou

Re: time zone

2008-10-15 Thread Olaf Stein
You can use the convert_tz function for this http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function _convert-tz On 10/15/08 12:03 PM, "Madan Thapa" <[EMAIL PROTECTED]> wrote: > Hi, > > Can we make adjustments in mysql or php code to display time in php sites > in EST , alt

Re: Insert static column into VIEW

2008-10-14 Thread Olaf Stein
You can add a column to a view like this: CREATE VIEW test4 AS SELECT nummer AS name, ip as content, 1 as domain_id FROM jabix.spaces JOIN jabix.ves ON spaces.veid = ves.id; This will set the domain_id vaulues to 1 Olaf On 10/14/08 8:18 AM, "Samuel Vogel" <[EMAIL PROTECTED]> wrote: > Hey guys,

Re: Getting more info from "show full processlist"

2008-10-06 Thread Olaf Stein
It specifies the query in the Info field. In your case the connection is "sleeping", nothing is being executed at the moment, therefore info is NULL Olaf On 10/6/08 11:38 AM, "MaBa.listas" <[EMAIL PROTECTED]> wrote: > Hello, > reading the MySQL documentation I've run into the " show full

Re: Any easier way to compare mysql schema of 50 databases?!

2008-10-06 Thread Olaf Stein
In order to make your workaround less tedious you can write a shell script that dumps the structures of all 50 databases basically: for db in $(mysql [opts] -e 'show databases'); do mysqldump [opts] $db Done Olaf On 10/5/08 10:15 PM, "Uma Bhat" <[EMAIL PROTECTED]> wrote: > Hey guys! > >

Views and replication

2008-10-02 Thread Olaf Stein
Hi all, In my master/salve setup the only database I do not replicate is mysql. The slave has only the users absolutely necessary to select and administer, that is why a lot of the users I have on the master are not there. When I create a view on the master the definer is set to the user I am log

Re: LOAD - failure for a non-admin user

2008-10-01 Thread Olaf Stein
The user needs to file privilege" to "load data infile" which is a global privilege, not database bound I assume you created hydro like this: Grant all on hydro.* to [EMAIL PROTECTED] ... If you do a: >use mysql; >select * from db; You will see that the file priv is not a part of that permissi

Replication error 1236

2008-08-01 Thread Olaf Stein
Hi All, Once a week or so I get the following error: 080801 8:18:35 [ERROR] Error reading packet from server: error reading log entry ( server_errno=1236) 080801 8:18:35 [ERROR] Got fatal error 1236: 'error reading log entry' from master when reading data from binary log Stopping the slave an

Re: Restore information

2008-07-21 Thread Olaf Stein
this by hand or are you suing any tools provided by mysql or a third party Olaf On 7/21/08 8:41 AM, "Warren Windvogel" <[EMAIL PROTECTED]> wrote: > Olaf Stein wrote: >> Is my assumption correct that you dump your main production db and restore >> it to a second s

Re: Restore information

2008-07-21 Thread Olaf Stein
Is my assumption correct that you dump your main production db and restore it to a second server? And this restore is what you want to verify? Olaf On 7/21/08 8:34 AM, "Warren Windvogel" <[EMAIL PROTECTED]> wrote: > Hi All, > Is there a simple way of checking when the backup db server performed

Replication and procedures

2008-06-30 Thread Olaf Stein
Hi all, I am just getting started with replicating my servers and noticed that queries executed by procedures on the master are not replicated to my slaves. I need to know if this can be changed or if I have to get rid of my procedures? Thanks Olaf - Confi

Maatkit question

2008-06-24 Thread Olaf Stein
Hi guys, This might be somewhat off topic but does anyone have experience with Baron Schwartz's maatkit, particulary with error messages? I have several databases on my master/slave setup and can use mk-table-checksum on almost all of them on both hosts. There are 3 databases where I get this er

Re: 1B row/50GB myisam w/5 indexes - build after or during load?

2008-06-12 Thread Olaf Stein
Sid, Do you still have them as myisam files (myd,myi)? If yes and your other server has the same mysql version and cpu architecture you can just copy the myisam binary files to the new server. If you have the dump only you can either load with the mysql client or parse it, create a csv filw with

Re: Large import into MYISAM - performance problems

2008-06-05 Thread Olaf Stein
Even more when you compare to a script executing the inserts, instead the mysql client... Olaf On 6/5/08 12:06 PM, "mos" <[EMAIL PROTECTED]> wrote: > At 10:30 AM 6/5/2008, you wrote: >> Simon, >> >> In my experience load data infile is a lot faster than a sql file htrough >> the client. >> I

Re: Large import into MYISAM - performance problems

2008-06-05 Thread Olaf Stein
Simon, In my experience load data infile is a lot faster than a sql file htrough the client. I would parse the sql file and create a csv file with just the columns of your table and then use load data infile using the created csv file Olaf On 6/5/08 4:52 AM, "Simon Collins" <[EMAIL PROTECTED]>

Re: Migration from 32-bit to 64-bit MySQL

2008-04-25 Thread Olaf Stein
entation for 64bit. > > On Fri, Apr 25, 2008 at 12:03 PM, Olaf Stein > <[EMAIL PROTECTED]> wrote: >> Probably not >> >> AFAIK it should work in theory if you have no floating point columns but I >> would not try it. >> Why cant you take a dump, you can

Re: Migration from 32-bit to 64-bit MySQL

2008-04-25 Thread Olaf Stein
. On 4/25/08 11:57 AM, "Mike" <[EMAIL PROTECTED]> wrote: > On Fri, Apr 25, 2008 at 11:45 AM, Olaf Stein > <[EMAIL PROTECTED]> wrote: >> As long as you use dumps to restore your databases on the new 64bit system >> (instead of the binary files) you should be f

Re: Migration from 32-bit to 64-bit MySQL

2008-04-25 Thread Olaf Stein
As long as you use dumps to restore your databases on the new 64bit system (instead of the binary files) you should be fine Olaf On 4/25/08 11:23 AM, "Mike" <[EMAIL PROTECTED]> wrote: > I would like to move from 32-bit to 64-bit MySQL within the next year. > Unfortunately, there is not a lot of

Re: Completeness rate of records

2008-03-27 Thread Olaf Stein
Thanks. But that means I have to type all 40 column names, which I what IU was trying to avoid Olaf On 3/27/08 1:34 PM, "Rob Wultsch" <[EMAIL PROTECTED]> wrote: > On Thu, Mar 27, 2008 at 10:16 AM, Olaf Stein > <[EMAIL PROTECTED]> wrote: >> I have a table

Completeness rate of records

2008-03-27 Thread Olaf Stein
Hey all, I have a table with 40 columns. If for a record a value is not available the column is set to NULL. Is there a quick way of finding out how many records have a value (NOT NULL) for 90% (or lets say 35 columns) of the columns. Thanks Olaf - Confide

Error 1136 problem

2008-02-06 Thread Olaf Stein
Hi All I am trying to run this query: update minpheno set TMP_ados_version='0' where ident=898; On below table: And get error 1136 ERROR 1136 (21S01): Column count doesn't match value count at row 1 How can that be (obviously ident=898 exists)? I am going nuts Thanks Olaf +--

Re: SQL_LOG_OFF / super priv question

2008-02-04 Thread Olaf Stein
e file or super? > > On Jan 31, 2008 10:29 PM, Olaf Stein <[EMAIL PROTECTED]> > wrote: >> Hi All, >> >> I would like for my regular database users to be able to turn logging off >> for certain sessions. This would work by allowing them to set SQL_LOG_O

DISABLE TRIGGER alternative

2008-01-31 Thread Olaf Stein
Hi All, I want to disable a trigger on a table for the statements that run within a stored procedure. As DISABLE TRIGGER is not an option I was wondering if any body has any alternatives/ideas on how to achieve this Thanks Olaf - Confidentiality Notice: Th

SQL_LOG_OFF / super priv question

2008-01-31 Thread Olaf Stein
Hi All, I would like for my regular database users to be able to turn logging off for certain sessions. This would work by allowing them to set SQL_LOG_OFF and SQL_LOG_BIN. This requires the user to have the SUPER privilege. Is there any reason why regular users should not have this privilege? Or,

Re: Sun and mysql - sorry

2008-01-17 Thread Olaf Stein
I guess Ford is not a GM brand. Just substitute Ford with a GM brand On 1/17/08 12:23 PM, "Olaf Stein" <[EMAIL PROTECTED]> wrote: > I understand the marketing and hype thing. > I still have a hard time believing that the net worth is actually that high. > I guess we w

Re: Sun and mysql

2008-01-17 Thread Olaf Stein
I understand the marketing and hype thing. I still have a hard time believing that the net worth is actually that high. I guess we will see in 10 years or so... Maybe facebook should by GM, Ford can use some of that hype On 1/17/08 12:19 PM, "Mark Leith" <[EMAIL PROTECTED]> wrot

Re: Sun and mysql

2008-01-17 Thread Olaf Stein
Barry Newton" <[EMAIL PROTECTED]> wrote: > Olaf Stein wrote: >> I am still amazed by the fact that youtube "is worth" 1.5 billion and MySQL >> AB barely 1 billion. Did they sell under price? Or does Google just have way >> to much many to spend/waste? >

Re: Sun and mysql

2008-01-17 Thread Olaf Stein
2008 11:07:19 -0500 > Olaf Stein <[EMAIL PROTECTED]> wrote: > >> I am still amazed by the fact that youtube "is worth" 1.5 billion and >> MySQL AB barely 1 billion. Did they sell under price? Or does Google >> just have way to much many to spend/waste? &

Sun and mysql

2008-01-17 Thread Olaf Stein
I am still amazed by the fact that youtube "is worth" 1.5 billion and MySQL AB barely 1 billion. Did they sell under price? Or does Google just have way to much many to spend/waste? Greetings from the just wondering... Olaf - Confidentiality Notice: The fol

Re: database theory book recommendations?

2008-01-16 Thread Olaf Stein
Not necessarily theory but very good if you want to work with mysql is the mysql 5.0 certification guide olaf On 1/16/08 9:40 AM, "Toby Douglass" <[EMAIL PROTECTED]> wrote: > I'm currently applying for a developer job with mySQL. > > I want to improve my database theory knowledge. > > Any boo

Re: Is this kind of ORDER BY possible?

2007-11-05 Thread Olaf Stein
I don't think you can order on a certain condition within a query. You can do this with a stored procedure though ... Or, but that would require some logic in the app, with views Greets Olaf On 11/5/07 10:55 AM, "Christoph Boget" <[EMAIL PROTECTED]> wrote: > Let's say that I have the following

Re: What is MYSQL's equivalent to Oracle's DBMS_OUTPUT

2007-09-26 Thread Olaf Stein
Is this for debugging purposes? Olaf On 9/26/07 12:37 PM, "sol beach" <[EMAIL PROTECTED]> wrote: > Oracle provides a stored procedure called DBMS_OUTPUT which primarily is > used to write/print/display text string to StandardOut (a.k.a. the > terminal). > In V5 MYSQL is there a functional equiv

Trigger COMMENT question

2007-09-20 Thread Olaf Stein
Hey all, Is there any way to add a COMMENT to a trigger like for a stored proc. Ideally it would be the same mechanism like for the stored proc but other options are welcome too. I basically need this for a tool that I am writing that outputs everything about a database that is available (schemas,

Re: mysql restore db error ?

2007-09-06 Thread Olaf Stein
If the dumps was from a single table you probably need to create the table before restoring the data from the dump olaf On 9/6/07 11:12 AM, "2 Logic Studios" <[EMAIL PROTECTED]> wrote: > hello , > > am a myql newbie , i am trying to restore a mysql database using > phpmyadmin but i keep on get

Re: Delete query question

2007-09-05 Thread Olaf Stein
the number of rows and can be faster. COUNT(*) is what you want > to use 99% of the time. > > Regards > Baron > > Olaf Stein wrote: >> Thanks, >> >> This seems to work but that IN seems to be really slow... >> >> >> On 9/5/07 9:41 AM, &

Re: Delete query question

2007-09-05 Thread Olaf Stein
things.. it's not > necessary that I know of) > > > - Original Message - > From: "Olaf Stein" <[EMAIL PROTECTED]> > To: "MySql" > Sent: Wednesday, September 05, 2007 9:35 AM > Subject: Delete query question > > >> Hey all

Delete query question

2007-09-05 Thread Olaf Stein
Hey all I am stuck here (thinking wise) and need some ideas: I have this table: CREATE TABLE `geno_260k` ( `genotype_id` int(10) unsigned NOT NULL auto_increment, `ident` int(10) unsigned NOT NULL, `marker_id` int(10) unsigned NOT NULL, `a1` tinyint(3) unsigned NOT NULL, `a2` tinyint(3

Re: timestamp for update and insert

2007-09-04 Thread Olaf Stein
? >>> >>> is there a way to create this table that accomplishes these two goals? >>> >>> thanks, >>> T. Hiep >>> >>> On Tue, 4 Sep 2007, Michael Dykman wrote: >>> >>>> Triggers are a fine idea, but I would

Re: timestamp for update and insert

2007-09-04 Thread Olaf Stein
the database and more or less forget about it. > > - michael > > > On 9/4/07, Olaf Stein <[EMAIL PROTECTED]> wrote: >> I would use a trigger (at least for the update) >> >> The first insert should work with now() and you can leave lastupdateted >>

Re: timestamp for update and insert

2007-09-04 Thread Olaf Stein
I would use a trigger (at least for the update) The first insert should work with now() and you can leave lastupdateted empty Olaf On 9/4/07 3:01 PM, "Hiep Nguyen" <[EMAIL PROTECTED]> wrote: > Hi list, > > i tried to create a table with inserted & lastupdated timestamp fields: > > creat

Re: Removed ibdata1

2007-08-24 Thread Olaf Stein
on't have dump data :-S > > > 2007/8/24, Olaf Stein <[EMAIL PROTECTED]>: >> If you use default configuration (meaning all innodb data in one idata file) >> you just deleted your data. >> If you have a recent dump, drop all innodb tables and use the dump to

Re: Removed ibdata1

2007-08-24 Thread Olaf Stein
If you use default configuration (meaning all innodb data in one idata file) you just deleted your data. If you have a recent dump, drop all innodb tables and use the dump to restore On 8/24/07 3:20 PM, "Adriano Ceccarelli" <[EMAIL PROTECTED]> wrote: > Hi, > > I removed accidentaly the files :

Re: MYSQL ENTERPRISE AND COMMUNITY

2007-08-22 Thread Olaf Stein
question > that, whether the mysql database software provided in enterprise edition is > same as community edition or some other features is there. > > Regards, > Krishna > > > On 8/23/07, Olaf Stein <[EMAIL PROTECTED]> wrote: >> http://www.mysql.com/produc

Re: MYSQL ENTERPRISE AND COMMUNITY

2007-08-22 Thread Olaf Stein
onal features. > Please give me the details. > > regards, > Krishna - Olaf Stein DBA Center for Quantitative and Computational Biology Columbus Children's Research Institute 700 Children's Drive phone: 1-614-355-5685 cell: 1-614-843-0432 email: [EMA

Stored proc question

2007-08-21 Thread Olaf Stein
Hi all, My basic question is, is there a simple way of finding out if a select statement executed within a stored proc returns something. I could go ahead, do the fetch (the query is done with a cursor) and count how many records were returned but looping over the result. In below proc the variabl

Re: su-like functionality

2007-07-23 Thread Olaf Stein
ccounts (we > are a web-hosting company) without having to use their passwords. Having > to su keeps ownerships and stuff like that in check. > > Thanks in advance, > Carlo - Olaf Stein DBA Center for Quantitative and Computational Biology Columbus Children&

Re: Seeing Table Structure

2007-07-23 Thread Olaf Stein
I don't know of any way of doing this for all tables. I wrote a python script that creates a html file with information about tables (engine, fields,keys,indices) If you are interested in it I can email it Olaf On 7/23/07 11:34 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi; > I need t

Re: Unique Rowid

2007-07-19 Thread Olaf Stein
to do this ? I was also considering > doing something along the lines of ProcessID + Year + Month + Day + > Hour + Second + MilliSecond + 4 digit random, would this be a better idea ? > > TIA, > JC - Olaf Stein DBA Center for Quantitative and Computa

Re: mysqld works but not mysqld_safe

2007-07-18 Thread Olaf Stein
You have bin log enabled and it might be looking for the last bin log before the last shutdown ('/usr/local/mysql-5.0.41-osx10.4-i686/data/me-web2-bin.27') You can either: - move the missing binlog file where mysql is looking for it - delete the $hostname.index file that keeps track of binlo

Re: MySQL admin GUI

2007-07-13 Thread Olaf Stein
; www.the-infoshop.com <http://www.the-infoshop.com/> > www.giiexpress.com <http://www.giiexpress.com/> > www.etudes-marche.com > - Olaf Stein DBA Center for Quantitative and Computational Biology Columbus Children's Research Institute 70

Re: Import a text file

2007-07-07 Thread Olaf Stein
In python - import re file = open("path/to/file","r") for line in file: line = line.replace("\n","")# this is not always needed columns = re.split("\s+",line) print columns#is now a list print columns[0] sql = "insert into ..." -

Re: acquire mysql knowledge in short time

2007-06-26 Thread Olaf Stein
Buy the mysql 5.0 certification study guide. It covers all aspects of mysql. For more detailed information on functionality use the online documentation. Olaf On 6/26/07 4:03 PM, "Peter Teunissen" <[EMAIL PROTECTED]> wrote: > Hi All, > > > For an opensource project at work, I need to get to

Innodb tablespace

2007-06-15 Thread Olaf Stein
Hi all, Are there any reasons why one would NOT use separate ibd files for each table (--innodb_file_per_table). It seems logical to me to separate what does not belong together logically (different databases), but I as the shared tablespace is the default I wonder if it has nay advantages I am no

Re: maximum number of records in a table

2007-06-12 Thread Olaf Stein
You should be fine. 100 000 000 is not that much. Just make sure you set the right keys (and then query by them) on the table and even more importantly, set caches and buffers to utilize your RAM appropriately. Olaf On 6/12/07 11:09 AM, "kalin mintchev" <[EMAIL PROTECTED]> wrote: >> I guess a l

Re: maximum number of records in a table

2007-06-12 Thread Olaf Stein
I guess a lot of that depends what an acceptable query execution time for you is. Also, what else does the machine do, are there other databases or tables that are queried at the same time, do you have to join other tables in for your queries, etc? Olaf On 6/12/07 3:24 AM, "kalin mintchev" <[EMA

Re: Data migration Verification

2007-06-04 Thread Olaf Stein
> This is my problem. Sampling would speed this up, but I need something more > accurate. > All data is important. > > > > > Olaf Stein-2 wrote: >> >> Besides the sample approach, output data (a set you would output on a live >> system anyway

Re: Data migration Verification

2007-06-01 Thread Olaf Stein
Besides the sample approach, output data (a set you would output on a live system anyway) from both db setups and see if you can get the same output from both Olaf On 6/1/07 10:35 AM, "paulizaz" <[EMAIL PROTECTED]> wrote: > > Hi all, > > I have somebody creating a C# class to migrate data fr

Re: Data types and reading in data

2007-05-31 Thread Olaf Stein
You could write a little script that loops through your lines in the csv file, makes the changes to fields you need and insert into the database then. This gives you full control over the new table structure (order,types, etc) Olaf On 5/31/07 12:02 AM, "David Scott" <[EMAIL PROTECTED]> wrote: >

Re: Trigger question

2007-05-30 Thread Olaf Stein
Baron, Thanks a lot Adding the columns to the end works... Olaf On 5/30/07 2:13 PM, "Baron Schwartz" <[EMAIL PROTECTED]> wrote: > Hi, > > Olaf Stein wrote: >> Hey all, >> >> I asked this before (a while back) and have gotten some answ

Trigger question

2007-05-30 Thread Olaf Stein
Hey all, I asked this before (a while back) and have gotten some answers that solve my problem partially only. --- old message -- I have a table with 205 columns. When an update statement updates a row in this table I want a trigger that creates a record of the old row in a separate

Stored function problem

2007-05-22 Thread Olaf Stein
Hi All, I have a problem that I do not quite understand. I have a table with individuals: CREATE TABLE `individual` ( `ident` mediumint(8) unsigned NOT NULL auto_increment, `fid` mediumint(8) unsigned NOT NULL, `iid` mediumint(8) unsigned NOT NULL, PRIMARY KEY (`ident`), KEY `fidiid`

5.1 release date

2007-05-22 Thread Olaf Stein
Hi all, Are there any projections as to when mysql 5.1 will be released? Thanks Olaf -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: backup solution.

2007-05-15 Thread Olaf Stein
I am not sure if you can restore just one table from a dump with the mysql client, you could however just copy the table entries out of you dump into a new file and restore that On 5/15/07 12:28 AM, "Ananda Kumar" <[EMAIL PROTECTED]> wrote: > Hi All, > I have take a mysqldump of my entire databa

Trigger OLD question

2007-05-09 Thread Olaf Stein
Hi All, I have a table with 205 columns. When an update statement updates a row in this table I want a trigger that creates a record of the old row in a separate table. The following works fine when not too many columns need to be written into the other table CREATE TRIGGER track_table BEFORE UPD

Looking for people with similar data for exchange of ideas

2007-04-20 Thread Olaf Stein
Hi all, I am hoping to find someone with similar data, who is using mysql to exchange ideas and concepts. A second opinion is always good I guess. I work in a research setup and store mainly trial related, genotypic and phenotypic information. As technology progresses and we are expecting 1M chip

Describe question

2007-03-27 Thread Olaf Stein
Hi All, Is there a way to influence the order in which columns are returned in a describe table statement. Basically I want the same order that I get in the mysql client (Field, Type, Null, etc) in a little script I am writing, so I can use the Column headers dynamically. Thanks Olaf -- MySQL

Character sets

2007-03-19 Thread Olaf Stein
Hi All, What character sets would you recommend for a server in the US and all data stays within the English language. Currently everything is set to latin1 with latin1_swedich_ci collation which seems to be the closets one to what I need from what I have read, I was just wondering if there is a b

Innodb, why not?

2007-01-25 Thread Olaf Stein
Hi All I know the innodb vs myisam issue comes up quite frequently. I went through old threads and could not find an answer to my questions. Generally, is there any reason/scenario not to use innodb? >From a feature perspective, I do not need full text indices, foreign keys are usefull but not n

Re: Date format question

2007-01-15 Thread Olaf Stein
u > want to pull up the customized date. It will get stored as a timestamp > (integer), so you really won't notice that much of a storage difference. - Olaf Stein DBA Center for Quantitative and Computational Biology Columbus Children's Research Institute 700

  1   2   >