Re: Newbye speed question

2003-10-03 Thread Michael Brunson
I wonder why you have 19 fields in a single table.

I don't think there is really any way to predict it,
since it depends on so many different factors. 



On Fri, 3 Oct 2003 11:19:56 +0200, Peer Reiser
[EMAIL PROTECTED] wrote:

| Fortunately the database is not in production :-) but it should go as 
| soon as possible :-(
| 
| 
| On viernes, octu 3, 2003, at 11:03 Europe/Madrid, Wang Feng wrote:
| 
|  18hrs??? So, the database has been LOCKED for 18hrs
| 
| 
|  - Original Message -
|  From: Peer Reiser [EMAIL PROTECTED]
|  To: [EMAIL PROTECTED]
|  Sent: Friday, October 03, 2003 6:57 PM
|  Subject: Newbye speed question
| 
| 
|  HI
| 
|  I am having a MYISAM database with 27 million rows and 19 fields all
|  char between 15 and 1 characters long.
| 
|  yesterday i did a
|  alter table mytablename add column (version char(2));
|  By now (18 hours later) it has not finished yet?
|  Is there a way to somehow predict the time needed for this? Or to see
|  the status?
|  Or anyone has some experiense?
| 
|  thanx
| 
| 
|  -- 
|  MySQL General Mailing List
|  For list archives: http://lists.mysql.com/mysql
|  To unsubscribe:
|  http://lists.mysql.com/[EMAIL PROTECTED]
| 
| 
|  -- 
|  MySQL General Mailing List
|  For list archives: http://lists.mysql.com/mysql
|  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
| 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Updated: How to write this query

2003-10-01 Thread Michael Brunson
On Wed, 1 Oct 2003 16:58:26 -0500, sean peters
[EMAIL PROTECTED] wrote:
[...]
| So ive been running a query like:
| SELECT A_data, B_data, C_data FROM A, B, C
| WHERE A.A_ID = B.A_ID
| AND A.A_ID = C.A_ID
| AND A.A_ID = 4;
| 
[...]
| 
| What i really want is to get the A_data from A, and if there are cooresponding 
| records in B and/or C, get B_data and/or C_data, respectively.
| 
| This works fine if there are cooresponding records in tables B and C for each 
| record in A, but if not, this returns nothing.
| 
| So, short of querying each table, i cant come up with a good solution to my 
| problem.
| 
| If there were only 2 tables, a LEFT JOIN would work fine, but both B and C 
| want to be left joined to A, which i dont know how to do.


SELECT A_data, B_data, C_data 
  FROM
A
  LEFT JOIN 
B ON A.A_ID = B.A_ID 
  LEFT JOIN 
C ON A.A_ID = C.A_ID
  WHERE A.A_ID = 4;


That should do it.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: random record

2003-09-15 Thread Michael Brunson
I just checked... 

83

On Mon, 15 Sep 2003 13:54:53 +0100, Andy Eastham
[EMAIL PROTECTED] wrote:

| 39?
| 
|  -Original Message-
|  From: tuncay bas [mailto:[EMAIL PROTECTED]
|  Sent: 15 September 2003 13:32
|  To: mysql
|  Subject: random record
|  
|  
|  hi,
|  
|  why its mysql database over random record use?



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: moving MySQl database

2003-08-21 Thread Michael Brunson
Check your ownerships and permissions.

On Thu, 21 Aug 2003 00:27:05 +0800, Jon  Miller used a
few recycled electrons to form:

| I've tried moving the database from one partition to another and now I'm getting the 
following error:
| # Starting mysqld daemon with databases from /data/mysql
| 030820 23:48:08  mysqld ended
| When I issue #/ /usr/share/mysql/mysql.server start
| 
| Anyone have any idea what's gone wrong.  I changed the datadir in both /etc/my.cnf 
and /usr/share/mysql/mysql.server.
| 
| This is on a MySQL-3.23.55-1 server.
| 
| Thanks
| 
| Thanks
| 
| Jon L. Miller, MCNE, CNS
| Director/Sr Systems Consultant
| MMT Networks Pty Ltd
| http://www.mmtnetworks.com.au
| 
| I don't know the key to success, but the key to failure
|  is trying to please everybody. -Bill Cosby


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Doing Differential backup

2003-08-21 Thread Michael Brunson
On Wed, 20 Aug 2003 18:44:04 -0500, Miguel Perez used a
few recycled electrons to form:
| 
| Hi list,
| 
| Does any know how to do differential backups or does exist a tool
| that do this kind of backups.
| 
| I have mysql 4.0.12 and use innodb tables, mysql is running on
| redhat 7.3

You are probably out of luck if what you are looking to
do it backup just what has changed in the database. Due
to how innodb is stored any backup software would
backup the entire data file. It might not even be able
to do a good job at it. 

I have backups that do mysqldumps of the databases.
These work pretty well. They are run off of a slave
that it's only purpose is to replicate for the backups.
We use to run without replication and it sucked!

There might be other options out there but I haven't
seen them.




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Master/Master Asynchronous replication

2003-07-29 Thread Michael Brunson
On Mon, 28 Jul 2003 22:23:06 -0700, Jeremy Zawodny used
a few recycled electrons to form:

| On Wed, Jul 23, 2003 at 04:47:35PM -0400, Joe Gainey wrote:
|  
|  Currently we have a web based application that is mostly reads (4:1 
|  r/w).  It is using a single MySQL database server.  Is there any way to 
|  have two database servers in a master/master configuration such that 
|  writes to either database server are replicated to eachother.  Basically 
|  even though we have a 4:1 ration of read/write the writes happen often 
|  enought that when the database goes down the app stops working.  I know 
|  how to get this working in Oracle (insert big laugh here) but Oracle is 
|  cost prohibitive.  Any pointers?  Any suggestions?  If this is available 
|  in the latest version that would be great.
| 
| You can do it, yes.
| 
| But beware that MySQL has no provisions for conflict resolution.  So
| using auto-increment fields with primary keys (for example) can be a
| problem because of the inherent race condition.

What about using a joined primary key, such that 

PRIMARY KEY (server_id,auto_increment_column)

Of course you might be able to set the server_id
differently in the create table defaults on the
different servers.

Just a thought.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How can a single row with a single column represent 2 values without bitwise data representation

2003-06-27 Thread Michael Brunson
On Fri, 27 Jun 2003 14:50:58 -0700, Dathan Vance
Pattishall [EMAIL PROTECTED] wrote:
 
| So, my question is how can multiple values for a single field get
| represented in a single row and receive the benefits of an index? How
| can this data be represented?

Try using a SET column type and then using mysql's
FIND_IN_SET() function in your where clause.



--
Michael Brunson  504.200.
[EMAIL PROTECTED]ICQ: 83163789
Data Center Manager --  www.zipa.com  --Zipa, LLC


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Table design suggestions?

2003-06-11 Thread Michael Brunson
On Wed, 11 Jun 2003 22:17:09 -0230, JJ
[EMAIL PROTECTED] wrote:
[...]
| ***
| * The second idea is to create two tables.
| ***
| table groups
| groupName varchar primary key
| groupDescription text
| 
| table groupRelations
|   groupName
|   groupMember
| 
| - ex:
| groups table:
| groupOneFirst test group
| groupTwo   Second test group
| 
| groupRelations:
| groupOnemember1
| groupOnemember3
| groupTwomember2
| groupTwomember3
| 
| Like I said before, I'm not very happy with either method. If anyone else
| has any better ideas they wouldn't mind sharing, I'd really appreciate it!

This scheme will give you the most flexibility. There
is no limit as to how many people can be in a group or
how many groups a person can be in. You will want to
create a joined unique key on the group_id and
member_id.

Have Fun!

Michael 

--
Michael Brunson  504.200.
[EMAIL PROTECTED]ICQ: 83163789
Data Center Manager --  www.zipa.com  --Zipa, LLC




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Thoughts on MySQL training?

2003-04-02 Thread Michael Brunson
On Wed, 2 Apr 2003 13:23:29 -0800 (PST), Rachel
Rodriguez [EMAIL PROTECTED] wrote:

| I was wondering if anyone on the list has attended any
| of the training listed on the mysql.com site.  If yes,
| was it worth the costs in your opinion?  I'm trying to
| justify the costs to my management.  

I went to one over a year ago.. and I liked it so much
that I convinced our CEO to get the trainer (Jeremy) in
for a week to train all our developers. Definitely
worth the price.



Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL mail servers

2003-04-01 Thread Michael Brunson
On Tue, 1 Apr 2003 13:15:00 -0800, Jeremy Zawodny used a few
recycled electrons to form:
| On Tue, Apr 01, 2003 at 01:04:59PM -0800, Steven Nakhla wrote:
| 
|  Are there currently any open-source mail servers that utilize MySQL?
| 
| Yes, many.
| 
|  I know that there are some that will authenticate against accounts
|  stored in a MySQL database, but I am looking for a mail server that
|  actually stores the messages in the database.
| 
| Why, exactly?

I know of one, but it isn't open source. It's called Iris and
was written in-house by one of our developers. Iris currently
processes all the email forwarding, pop, IMAP, etc for
directNIC.com customers. It supports filters, mailing lists,
archiving, RBLs, auto-responders, and probably a couple things I
forget... I'm trying to get him to add a NNTP interface for the
mailing lists now. ;-)

So I guess the short answer is yes, there is at least one. We
only use it in-house currently.

There might be others...

--Michael


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: composite keys indexing

2003-04-01 Thread Michael Brunson
On Tue, 1 Apr 2003 20:30:32 -0800 (PST), Jinesh Varia used a few
recycled electrons to form:
| Hello group,
| 
| I have a simple composite key
| create table a_b (aID int NOT NULL, bID int NOT NULL, primary key
| (aID,bID));
| 
| Where aID is primary key in the table a and bID is the primary key in table b,
| 
| While my primary keys are automatically indexed, I am having problems when I use the 
bID.
| 
| I read the documentation about only the first column will be actually indexed, but 
is there any
| workaround (I am using 4.0 mysql version)
| 
| for ex,
| when I use
| select a.* from a where a_b.aID=34;
| 
| the query is damn fast!! it is only indexing the aID.
| 
| but when I use
| 
| select a.* from a,a_b where a_b.bID=55 and a_b.aID=a.aID;

Try:

select a.* from a_b left join a using aID where a_b.bID=55;

This will be a lot faster, since you are restricting your result
set, before doing the join.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: SQL optimization problem

2003-01-11 Thread Michael Brunson
LEFT JOIN


On Sat, 11 Jan 2003 18:35:44 +0100, Blaster used a few
recycled electrons to form:

| Hey,
| 
| (this post is pretty long, a short version of the problem is listed at the 
| bottom if you don't like reading long emails :P)
| 
| I'm currently going through all my SQL queries for my webpage to see if 
| there is anything I can do to optimize them.
| On my webpage, i have this poll where people can give their opinion in 
| various subjects by casting a vote. To begin
| with, I'd like to tell you how I created my tables for this task, the poll 
| uses in total 3 different tables as following:
| 
| poll_list (this table contains the actual question of each poll)
| ===
| id (int) | stamp (datetime) | question (varchar 255) | active (tinyint)
| 
| Id is simply an autoincrementing ID for each poll,
| 
| Stamp is the creation date of the poll,
| 
| Question holds the actual question (duh :P)
| 
| If Active is 1, it means that this is the active poll right now.
| Only one poll can be active at the same time.
| 
| poll_options (this table holds the valid answers for each poll. You may use 
| any number of answers in your poll)
| 
| id (int) | pid (int) | name (varchar 255)
| 
| id is again, autoinc field for this answer
| 
| pid is a pointer to which poll this particular answer belongs to, i.e pid = 
| poll_list.id
| 
| name holds the actual answer string
| 
| poll_votes (this table holds all the casted votes, one row is one vote)
| =
| id (int) | pid (int) | oid (int) | uid (int)
| 
| id, autoinc
| 
| pid, pointer to poll_list.id, tells me which poll this vote belongs to
| 
| oid, pointer to poll_options.id, tells me which option this user voted
| 
| uid, pointer to user account. I won't include the user table, just think of 
| this as a unique identifier
| for the users, prevents the same user from voting twice in a poll..
| 
| 
| AND now! to the problem! Prior to my optimzation checking began, the code 
| to display the
| results of a poll was something like this:
| 
| 1) Fetch the active poll:
| SELECT * FROM poll_list WHERE (active  0) ORDER BY stamp DESC LIMIT 1
| 
| 2) Fetch the answers for the poll ID we received from the prior query:
| SELECT * FROM poll_options WHERE pid='id_from_prior_query'
| 
| 3) For each option received in step 2, I did:
| SELECT * FROM poll_votes WHERE pid='poll_id' AND oid='option_id'
| 
| 4) Output HTML formated code to web visitor.
| 
| Now, I thought, it MUST be possible to make step 2 and 3 using 1 single 
| query, because using this old
| system (as shown above), it requires 1 + n queries, where n is number of 
| answers in that particular poll.
| 
| So, I simply replaced it with:
| 
| 1) Fetch the active poll:
| SELECT * FROM poll_list WHERE (active  0) ORDER BY stamp DESC LIMIT 1
| 
| 2) Fetch the answers  votes in the same query:
| SELECT a.name, COUNT(b.id) as votes FROM poll_options as a, poll_votes as b 
| WHERE b.pid='poll_id' AND b.oid=a.id GROUP BY b.oid
| 
| 3) Print the results.
| 
|  PROBLEM BEGINS HERE ##
| 
| However! Here comes the problem, if no vote is cast on an option, it will 
| not show up in the list! I want it to print 0%
| for any options that havn't received a vote, like it would with my old 
| query system. This is basically what I want to
| do:
| 
| Select all options from poll_options and, in the same query, count the 
| number of rows in poll_votes which has that
| particular options id as oid. Pretty hard to explain, but ideally, I'd 
| like to do
| 
| SELECT a.name, COUNT(b.id) as votes FROM poll_options as a, poll_votes as b 
| WHERE b.pid='poll_id' AND b.oid=a.id GROUP BY b.oid
| 
| With one exception, if votes = 0, it should be listed in the result aswell!
| 
| 
| -
| Before posting, please check:
|http://www.mysql.com/manual.php   (the manual)
|http://lists.mysql.com/   (the list archive)
| 
| To request this thread, e-mail [EMAIL PROTECTED]
| To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
| Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
| 


-
Before posting, please check:
   http://www.mysql.com/doc/ (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: update and data manipulation

2002-10-16 Thread Michael Brunson

On Thu, 17 Oct 2002 03:50:47 +0100, Nikolas Galanis
used a few recycled electrons to form:

| Hello
| 
| When I want to update a value, I can use numerical functions like +,* 
| etc. Can I do the same with strings? For example, when I want to append 
| a string in an existing value, how (if of course) can I do it inside the 
| update query? Thanks.

Yes 

| Nikolas
| 
| p.s: I know I can do it with PHP, I was just wondering if it is possible 
| with SQL.

Yes



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Replication

2002-06-07 Thread Michael Brunson

On Fri, 7 Jun 2002 17:40:01 -0600 , Orr, Steve
[EMAIL PROTECTED] wrote:

| What's the best way to lock down a slave to ensure that only select SQL
| queries are executed and that all command line SQL inserts, updates, and
| deletes are performed only on the master?
| 
| TIA

Only put in select privileges in the permission tables.



Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Anyone get MySQL and RH7.2 to work?

2002-03-07 Thread Michael Brunson

On Thu, 7 Mar 2002 22:20:46 -0500, Paul Warren used a
few recycled electrons to form:

| I've been frustrated with this for the past I-donno-how-many days. Has
| anyone been able to get MySQL to work on Red Hat 7.2?
| 
| I've been getting multiple errors. The First was the resolveIP() right from
| the beginning. I follwed what the mysql website said and got glibc version
| 2.95 and that error dissappeared but I got a new one.
| my latest error was can't find tgetent in either curces or termcap. I
| don't think I have either of the later installed. I don't know where I can
| get them.
| 
| I'm using the source code and compiling it. With the RPM, I still get errors
| but it has installed somewhat. I'd like a clean install.
| 
| Basically, I would like to know if anyone has got it to install sans errors
| and how did they do that.

I currently have 4.0.1 running on 2 RH 7.2 boxes, with
replication. Both installs are from src. All our 7.2
boxes are downgraded to gcc 2.95 from 2.96 as a rule.

On a related topic, we have been unsuccessful getting
glic recompiled on the 7.2 boxes so that we can reduce
the STACK_SIZE in LinuxThreads (I'd like to get
concurrent connections to the 1.5k range). We can
recompile it on RH 6.2 without issue, but would like to
get all the new boxes on 7.2 and then the other
production boxes to 7.2 as time permits. If anyone has
any tips to getting glibc recompiled it would be
greatly appreciated!

Thanks,
Michael




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: ENUM -- integers or strings?

2002-01-04 Thread Michael Brunson

PHP will handle your var types for you just fine. If
you want to bet sure, so an intval() before you
compare.

On Fri, 4 Jan 2002 16:18:24 -0500, Erik Price used a
few recycled electrons to form:

| There's no data in the database yet, so I haven't tested this code.  I 
| don't want to use the mysql CLI client to input data b/c the data is 
| spread out over a number of tables, rather, I'm writing PHP pages that 
| provide a means to populate the database in an organized way.  But until 
| the PHP is done, I can't test... conundrum?
| 
| Erik
| 
| 
| On Friday, January 4, 2002, at 03:07  PM, Rick Emery wrote:
| 
|  What happened when you experimented?  What were your results?
| 
|  -Original Message-
|  From: Erik Price [mailto:[EMAIL PROTECTED]]
|  Sent: Friday, January 04, 2002 2:03 PM
|  To: [EMAIL PROTECTED]
|  Subject: ENUM -- integers or strings?
| 
| 
|  A quick question --
| 
|  If I have a table with an ENUM column, and the possible values are (0,
|  1, 2, 3), does the number qualify as an integer or a string?
| 
|  I am working in PHP4 and intend to compare this value as such:
| 
|  // dbaccess.access_level is ENUM(0, 1, 2, 3) column
|  // $user_id has been established already
| 
|  ?php
|  // get the access level for the user based on their ID
|  $sql = SELECT dbaccess.access_level
|  FROM dbaccess, users
|  WHERE $user_id = users.user_id
|  AND users.dbaccess_id = dbaccess.dbaccess_id  ;
|  $result = mysql_query($sql, $db) ;
|  $access_level = $result ;
| 
|  // generate page content according to the user's access level
|  switch ($access_level) {
|  case $access_level  2 :
|  // generate HTML + PHP page giving user
|  // ability to SELECT, INSERT, UPDATE, or
|  // DELETE from tables.  Finish page, then
|  break ;
|  case $access_level  1 :
|  // generate HTML + PHP page giving user
|  // ability to SELECT or INSERT from/to
|  // tables.  Finish page, then
|  break ;
|  case $access_level  0 :
|  // generate HTML + PHP page giving user
|  // ability to SELECT from tables.
|  // Finish page, then
|  break ;
|  default :
|  // print You cannot access this
|  // information. Finish page.
|  } ;
| 
|  Sure, the question is really quick (whether or not ENUM returns an
|  integer or string), but now that I think about it, does it really matter
|  for the purposes of my example here?  Wouldn't this PHP code be able to
|  take a string or an integer as an argument to the switch statement?
| 
|  Thanks for any advice anyone can give!
| 
| 
|  Erik
| 
| 
|  -
|  Before posting, please check:
| http://www.mysql.com/manual.php   (the manual)
| http://lists.mysql.com/   (the list archive)
| 
|  To request this thread, e-mail [EMAIL PROTECTED]
|  To unsubscribe, e-mail mysql-unsubscribe-
|  [EMAIL PROTECTED]
|  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
| 
|  -
|  Before posting, please check:
| http://www.mysql.com/manual.php   (the manual)
| http://lists.mysql.com/   (the list archive)
| 
|  To request this thread, e-mail [EMAIL PROTECTED]
|  To unsubscribe, e-mail mysql-unsubscribe-
|  [EMAIL PROTECTED]
|  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
| 
| 
| 
| -
| Before posting, please check:
|http://www.mysql.com/manual.php   (the manual)
|http://lists.mysql.com/   (the list archive)
| 
| To request this thread, e-mail [EMAIL PROTECTED]
| To unsubscribe, e-mail [EMAIL PROTECTED]
| Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
| 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: left join

2002-01-03 Thread Michael Brunson

On Thu, 03 Jan 2002 09:21:45 -0600, Dan Liu used a few recycled electrons to
form:

| Hi everyone,
| I ran a query which is:
| select A.a as a,B.b as b from A left join B on A.c=B.c and A.d=B.d order by A.c,A.d;
| Both table A and Table B have about 3000 records.And there are about 3000 records in 
|the result.But it takes 3 minutes and 50 seconds to run the query.
| Does anybody know how to make it faster?

Considering the amount of information supplied (table structures, type of data,
mysql version, and hardware), I'll make some suggestions with few assumptions,
which depending on the accuracy of the assumptions may work for you.

1. Index A.c, B.c, A.d, and B.d
2. Increase from 32M of ram to 16G
3. Put your data on an array of striped RAID 15k RPM SCSI disks
4. Upgrade from a 486 to a new Quad Xeon
5. Upgrade to the newest version of mysql
6. Change all your field types to TINYINT (note: might
   change result set)
7. Run TRUNCATE TABLE A;TRUNCATE TABLE B; before running 
   your select. (Note: this will change your result set)

Well, all those are sure to speed up your results 
(depending on your current situation)!

Hope that helps!  :)

Michael

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: duplicating collumn

2002-01-03 Thread Michael Brunson

On Fri, 04 Jan 2002 00:58:19 +0200, P.Agenbag
[EMAIL PROTECTED] wrote:

| Hi
| I have two tables, one contains a persons name and an ID number. The 
| other table contains the ID number and another field. Is there a way of 
| moving this collumn to the first table to corrlate with the ID's, ie, 
| table 1 must now contains name, ID and another field that is specific to 
| the person. The two tables are not chronological ie. the 1st entry in 
| the one table is not nescessarily the first in the second table...

CREATE TABLE t3 (
   ID ...,
   pn ...,
   af ... );
INSERT INTO t3 (ID,pn,af) 
   SELECT t1.ID, t1.pn, t2.af 
   FROM t1 LEFT JOIN t2 USING ID;
ALTER TABLE t1 RENAME t1_old;
ALTER TABLE t3 RENAME t1;


Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: INSERT INTO - need some advice

2002-01-03 Thread Michael Brunson

use the LAST_INSERT_ID() sql function

On Fri, 4 Jan 2002 11:32:19 +0800, Arvin Bautista used a few recycled electrons
to form:

| I had 2 tables, the second table had a field (a key field) that is related
| to the field of the first table
| 
| first tablesecond table
| __
| : client_id : client_name :: client_id :   services :
| ___
| 
| I'm trying to normalize the database. client_id field from first table is
| incremental (autoincrement). Now i need some advice how can i Insert record
| to the second table that it can have the same value that the first table
| client_id assigned by the autoincrement.  Is there an easy way to do it
| 
| Thank You in advance
| 
| Arvin
| 
| 
| 
| 
| -
| Before posting, please check:
|http://www.mysql.com/manual.php   (the manual)
|http://lists.mysql.com/   (the list archive)
| 
| To request this thread, e-mail [EMAIL PROTECTED]
| To unsubscribe, e-mail [EMAIL PROTECTED]
| Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
| 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Multilingual support

2002-01-03 Thread Michael Brunson

On 4 Jan 2002 06:27:44 -, K Jeevan used a few
recycled electrons to form:
| hi all
|We are using mySQL as our database. Our site needs multilingual support 
|especially Korean. We tested inserting some Korean fonts into the database. It 
|accepted the values but while retriving the values we are  not getting the inserted 
|values, WE do not know weather the values we got are of Korean script or the other. 
|But the consistency is being maitained in getting the junk values.
|   I just would like to know weather mySQL supports Korean language, if so is it 
|storing in form of some ASCII values. Please reply  


I have created a multi-lang table for a project
(gettext for the entire site) and didn't run int many
problems. Chances are your problems will stem form how
you are inserting or how you are extracting, rather
than how mysql is storing the data. Although most of
the asian languages rely on a 16 or 32 bit char set,
you should be ok. The issue with mysql you would run
into with is sorting, in which case you will need to
compile with those char-sets. 

How are you inserting them and then how are you
extracting and rendering the data?


--Michael title too long to type guy

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Could you look at this PHP/MySQL Code?

2002-01-02 Thread Michael Brunson

On Wed, 2 Jan 2002 15:30:51 -0400, Matt Rudderham [EMAIL PROTECTED] wrote:

| Hi,
| This is generating an error: 
| 
| Warning: Wrong parameter count for mysql_result() in
| /usr/local/www/html/matt/add.php on line 27
| 
| I can't figure out what the problem is, here is the code in question, it
| is part of an HTML form:
| 
| --Snip connect etc.. --
| // process form
| 
|   $sql = INSERT INTO members
| (first,last,position,organization,address,postal_code,county,phone,fax,e
| mail,website,member_type,on_directory,on_website,description,active,expi
| re_date) VALUES
| ('$first','$last','$position','$organization','$address','$postal_code',
| '$county','$phone','$fax','$email','$website',
| '$member_type','$on_directory','$on_website','$description','$active','$
| expire_date');
|   $result = mysql_query($sql);
|   echo Member Added\n;
|   $sql2 = select max(member_id) from members;
|   $member_id = mysql_query($sql2);
|   echo $member_id;
|   $sql3 = INSERT INTO skills (member_id, name, schooling,
| certifications, description) VALUES
| ('$member_id','$skill_name','$schooling','$certifications','$skill_descr
| iption');
|   $result = mysql_result($sql3);
|   echo $result;
|  ?


http://www.php.net/manual/en/function.mysql-result.php

mixed mysql_result (resource result, int row, mixed [field])

Requires at least 2 arguments.


Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Replication errors

2002-01-02 Thread Michael Brunson


Anyone have any ideas as to how I should handle a case
of the following error?

020102 13:27:28  Slave: Failed reading log event, reconnecting to retry, log 
'db1-bin.008' position 1064155638
020102 13:27:28  Slave: connected to master '[EMAIL PROTECTED]:3306',replication 
resumed in log 'db1-bin.008' at position 1064155638
020102 13:27:28  Error reading packet from server: binlog truncated in the middle of 
event (read_errno 0,server_errno=65535)

Replication seems to have stopped at that point and
the slave keeps trying to connect and dies at with that
error.


// database,sql,query,table


Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: database,

2002-01-02 Thread Michael Brunson

On Wed, 2 Jan 2002 21:00:59 -0800 (PST), help used a few recycled electrons to
form:
| database,sql,query,table
| 
| 
| 
| 
| I am new to phpmyadmin, I need to make a db for a
| online job resume service site. This site is like
| hotjobs but people can also attach photos. I need some
| direction on where to start on this project. 


http://www.mysql.com/training/index.html

:-)

Jeremy would love to see you there!


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: WG: Why I will stay with Microsoft SQL Server

2001-12-27 Thread Michael Brunson

On Thu, 27 Dec 2001 11:08:26 +0100, whiskyworld.de
[EMAIL PROTECTED] wrote:
|  Hi All,
| 
|  well, since the discussion of the benefits Mysql vs. MSSQL has i've come
|  across a real Problem. Even if its a little bit off-topic (but only a
| little
|  bit...) - perhaps s.b. knows a solution:
| 
|  Ok, here we are:
| 
|  I'm the webmaster of www.whiskyworld.de - an online Store that sells
| whisky
|  (over 1600 products in common) - its running now on a LAMPS system based
| on
|  SuSE 7.2 - really fine -
| 
|  last week we received a new Local Server (Dell 1500SC) - (local here in
| our
|  small Company) - so now ive got the problem: How can i hold the data on
| the
|  server (located in another part of Germany) up-to-date ? at least the
| thing
|  is that there are some Products Tables that are newer here local while
| some
|  other tables are newer on the server (orders and costumer informations) -
|  i've read about REPLICATION in MySQL but this is only if 1 server is
| always
|  the more up-to-date one - and i need a via versa solution -
|  - new whisky is in -  local is newer than server
|  - new order is in - server is newer than local
| 
|  i thought first of a selfprogrammed PHP solution because it then could
|  connect via SSL - in my opinion a secure solution - or ist there a ,well,
|  more comfortable possibility for this problem ?
| 
|  Greetings
| 
|  Korbinian Bachl
|  www.whiskyworld.de

Set-up ring replication, but in your case it would be a
very short ring with only 2 nodes. Both computers would
act as master and as slaves.  You'll have a problem
with auto-increment and maybe race conditions, so you
need to be careful with it.



Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
 ? Special Projects Programming Manager ?
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: How can I select in multi table

2001-12-26 Thread Michael Brunson

On Thu, 27 Dec 2001 11:19:18 +0800, cbsly [EMAIL PROTECTED] wrote:

| In my catalogs, there are many tables with the same structure. Every table is very 
|large, several
| million records and about 1 GB size. It is impossible to merge them into single one.
| How can I select in all of them at the same time but not select * from table1 
|where ... then
| select * from table2 where ..., then ...
| 
| Thanks
| 
| cb

Use a merge table as an overlay to select from.


http://www.mysql.com/doc/M/E/MERGE.html


Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
 ? Special Projects Programming Manager ?
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Why I can't run Mysql program ? Please Help !

2001-12-26 Thread Michael Brunson

On Thu, 27 Dec 2001 12:00:08 +0800, Kevin Chan [EMAIL PROTECTED] wrote:
[...]
| # ./bin/mysql
| ERROR 2002: Can't connect to local MySQL server through socket
| 'path-for-socket-file' (2)
[...]

You may want to edit your my.cnf file to have the path to the socket file.

:-)




Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
 ? Special Projects Programming Manager ?
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Benchmarking

2001-12-24 Thread Michael Brunson

On Mon, 24 Dec 2001 12:37:21 -0800, Joel Wickard used a
few recycled electrons to form:
| Hello,
| I've looked around on mysql.com, and through the directories of my mysql
| install I'm looking for information on benchmarking my mysql database, but
| I'm not interested in seeing how it performs against other databases, I'm
| interested in testing how my designs will perform when scaled.  If anyone
| can give me any pointers it would be great.

Your database performance is greatly dependant upon the
design. If your design is good, it should run great.
There are a lot of resources about good database
design.

Here are a few for you.
http://databases.about.com/cs/specificproducts/

The mysql docs have some turning tips also.



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Help! Languages and Characters....

2001-12-21 Thread Michael Brunson

On Fri, 21 Dec 2001 11:07:27 -0800 (PST), Shannon
Kendrick [EMAIL PROTECTED] wrote:

| I have a mysql table (MySAM), a field in there is set
| to unique, however the field does not seem to
| recognise the difference between certain ascii
| characters, for example it things that 
| 
| multimedia and multimèdia are the same (I hope it is
| shown correctly) but basically it dos not recognise
| characters like an e with an acute accent to be
| different from a normal e
| 
| Anyone know how I can fix this?


Set the field type as BINARY, that will make it case
sensitive.



Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
 ? Special Projects Programming Manager ?
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: ERROR 1006: Can't create database 'mynewdb'. (errno: 28)

2001-12-17 Thread Michael Brunson

On Mon, 17 Dec 2001 14:20:11 -0600, John Lepone
[EMAIL PROTECTED] wrote:

| I have recently installed MYSQL on my Mandrake 7.1 Linux box.  I connect to
| the DB as root.  When I try to create a new DB, I get the following error:
| 
|   [jlepone@mandrake jlepone]$ su
|   Password:
|   [root@mandrake jlepone]# mysql -p
|   Enter password:
|   Welcome to the MySQL monitor.  Commands end with ; or \g.
|   Your MySQL connection id is 2 to server version: 3.23.46-log
| 
|   Type 'help;' or '\h' for help. Type '\c' to clear the
| buffer.
| 
|   mysql CREATE DATABASE mynewdb;
|   ERROR 1006: Can't create database 'mynewdb'. (errno: 28)
|   mysql
| 
| 
| Likewise, if I try to add a table to an existing DB I get the following:
| 
|   mysql use test;
|   Database changed
|   mysql CREATE TABLE mynewtable (mycolumn int);
|   ERROR 3: Error writing file './test/mynewtable.frm'
| (Errcode: 28)
|   mysql
| 
| can anyone help?

Check your ownerships and permissions. All the
directories and files in the mysql data dir should be
owned by your mysql user and mysql group.



Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
 ? Special Projects Programming Manager ?
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL and kernel upgrade

2001-12-17 Thread Michael Brunson

On Tue, 18 Dec 2001 09:53:32 +0700, Sommai Fongnamthip
used a few recycled electrons to form:

| Hi,
|   I was read recommendation from MySQL download page to upgrade Linux Kernel 
| for latest MySQL version.  I have problem because I must still with Linux 
| Red Hat 6.2 (kernel 2.2.16-3) because it's my production server and Red Hat 
| has many task to upgrade in newer kernel.  What will effect my system if I 
| install latest MySQL with current kernel?

You should be able to upgrade the kernel to the 2.4
series without any problem. We have many production
boxes with RH 6.2 and the 2.4 kernel on them. Mysql
runs much better with the 2.4 kernel, esp on a multi
proc box.




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Database Synchronization

2001-12-07 Thread Michael Brunson

On Fri, 7 Dec 2001 03:07:56 -0800 (PST), Pragneshkumar
Gandhi [EMAIL PROTECTED] wrote:
| Hi All
| I am New Subscriber to this mailing List.
| This is Pragneshkumar from India.
| 
| I have one Application Which are wriitten in java/jsp and
| using mysql as db.
| 
| Now this application is running on net as well as in my
| intranet meand it is running on remote server as well as
| local server INDEPENDETLLY.
| 
| Now, I have to make one module to Synchronize that two
| databse with minimal change in database structure(adding
| extrta flds in table or etc).
| 
| My questions
| 1)
| Is there any way to Know to find only those records which
| are get changed (means update or insereted) After Some XYZ
| TIME.

Yes, put a timestamp field in the table.
 
| 2)
| Can i write any function in mysql which will call after
| insert or update of SOme XYZ table.
| Like triggers in ORACLE.

Not in the current version, maybe in version 4.1
http://www.mysql.com/doc/A/N/ANSI_diff_Triggers.html
 
| 3)
|  Can I write Interdatabase Query.
| like Select those Records from RemoteDB.SOMETABLE and which
| are not in LocalDB.SOMETABLE and insert in
| LocalDB.SOMETABLE

Not via sql, since left joins need to be done on tables
on same server. This is due to the fact that one query
can not take 2 connection handlers.
 
| Hope u will not get Angry with bunch of questions

Not a problem.

Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
 ? Special Projects Programming Manager ?
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: RAID RAID_CHUNKS speed differences

2001-11-16 Thread Michael Brunson

On Thu, 15 Nov 2001 23:29:27 -0800, Jeremy Zawodny used
a few recycled electrons to form:
| On Thu, Nov 15, 2001 at 04:14:58PM -0600, Michael Brunson wrote:
| 
|  Has anyone ran any benchmarks as to what affect different number of
|  RAID_CHUNKS has on speed?
| 
| The more chunks, the slower your retrieval speed is likely to be.  But
| how many chunks do you really need?  More than a few?

The .MYD right now is right at 2G, so 2 chunks would
work. We would need to rebuild again once the combined
size hits 4G. I could see the table growing, but
probably not more than another 10 million rows in the
next year. (It's at 30M now.)
 
|  mysql select count(*) from names where sld like
|  'foo%';
|  +--+
|  | count(*) |
|  +--+
|  |56033 |
|  +--+
|  1 row in set (0.33 sec)
| 
| Is there an index on sld?  It would seem so.  If that's the case,
| the test is relatively meaningless.  The index will be used to answer
| the query, not the raid'ed data files.

Yes, sld is the primary key for the table. In fact, sld
is the only column in the table.
 
|  mysql select count(*) from names where sld like
|  '%foo%';
|  +--+
|  | count(*) |
|  +--+
|  |   151460 |
|  +--+
|  1 row in set (2 min 3.70 sec)
| 
| Same here.
| 
| If you have a lot of %foo% queries, you probably want to look at
| fulltext indexing.

Any ideas why the times would jump up for 3 chunks and
back down for 5 and 15? Anyone think this might be more
of a memory/swap issue? 

Thanks for any input,
Michael


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Rename a Database?

2001-11-16 Thread Michael Brunson

This method will cause problems if you have entries in
you mysql.db table for that database. 

Just make sure you correct your permissions.

On Fri, 16 Nov 2001 11:46:31 -0500, Danny Rathjens
[EMAIL PROTECTED] wrote:

| stop mysql
| cd /var/lib/mysql
| mv olddbname newdbname
| start mysql
| 
| [EMAIL PROTECTED] wrote:
| 
|  I searched the archives and the manual online but could not find the
|  answer,
|  I believe this has been covered in the list though. Is it possible to
|  rename a
|  database? If not, is it possible to move/copy a table from a database to a
|  new
|  database? Could someone point me to the details on this?
|  
|  --
|  Chip

Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RAID RAID_CHUNKS speed differences

2001-11-15 Thread Michael Brunson

Has anyone ran any benchmarks as to what affect
different number of RAID_CHUNKS has on speed?

Also, what affect does the RAID_CHUNKSIZE have?

Here are a few results I've gotten all with the default
CHUCKSIZE.

-
No RAID Tables (yes, fewer rows.. hit the 2G limit)

mysql select count(*) from names;
+--+
| count(*) |
+--+
| 30304640 |
+--+
1 row in set (0.00 sec)

mysql select count(*) from names where sld like
'sex%';
+--+
| count(*) |
+--+
|56033 |
+--+
1 row in set (0.33 sec)

mysql select count(*) from names where sld like
'%sex%';
+--+
| count(*) |
+--+
|   151460 |
+--+
1 row in set (2 min 3.70 sec)

-
RAID_CHUNKS=3

mysql select count(*) from names;
+--+
| count(*) |
+--+
| 30352536 |
+--+
1 row in set (0.00 sec)

mysql select count(*) from names where sld like
'sex%';
+--+
| count(*) |
+--+
|55989 |
+--+
1 row in set (0.39 sec)

mysql select count(*) from names where sld like
'%sex%';
+--+
| count(*) |
+--+
|   151422 |
+--+
1 row in set (14 min 59.83 sec)

-
RAID_CHUNKS=5

mysql select count(*) from names;
+--+
| count(*) |
+--+
| 30352536 |
+--+
1 row in set (0.00 sec)

mysql select count(*) from names where sld like
'sex%';
+--+
| count(*) |
+--+
|55989 |
+--+
1 row in set (0.38 sec)

mysql select count(*) from names where sld like
'%sex%';
+--+
| count(*) |
+--+
|   151422 |
+--+
1 row in set (6 min 44.92 sec)


-
RAID_CHUNKS=15
mysql select count(*) from names;
+--+
| count(*) |
+--+
| 30352536 |
+--+
1 row in set (0.00 sec)

mysql select count(*) from names where sld like
'sex%';
+--+
| count(*) |
+--+
|55989 |
+--+
1 row in set (0.39 sec)


mysql select count(*) from names where sld like
'%sex%';
+--+
| count(*) |
+--+
|   151422 |
+--+
1 row in set (6 min 33.72 sec)

-


This is running on a pretty wimpy box, but all ran
several times so I was able to make sure the server was
fully up. The box is a 750 PIII with 756M of RAM,
running linux and the 3.23.44 version of mysql.

Any suggestions would be great.


Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
 ? Special Projects Programming Manager ?
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: RAID RAID_CHUNKS speed differences

2001-11-15 Thread Michael Brunson

Here is the same data in a little easy format.

Raid Chunks  count  like %like % %
10.00 sec   0.33 sec   2 min 3.70 sec
30.00 sec   0.39 sec  14 min 59.83 sec
50.00 sec   0.38 sec   6 min 44.92 sec
15   0.00 sec   0.39 sec   6 min 33.72 sec

Thanks,
Michael
--
Michael Brunson  504.473.6643
[EMAIL PROTECTED] ICQ: 83163789
 ? Special Projects Programming Manager ?
  ---   Intercosmos Media Group, Inc.  ---
  www.intercosmos.comwww.directnic.com 

On Thu, 15 Nov 2001 16:14:58 -0600, Michael Brunson
[EMAIL PROTECTED] wrote:

| Has anyone ran any benchmarks as to what affect
| different number of RAID_CHUNKS has on speed?
| 
| Also, what affect does the RAID_CHUNKSIZE have?
| 
| Here are a few results I've gotten all with the default
| CHUCKSIZE.
| 
| -
| No RAID Tables (yes, fewer rows.. hit the 2G limit)
| 
| mysql select count(*) from names;
| +--+
| | count(*) |
| +--+
| | 30304640 |
| +--+
| 1 row in set (0.00 sec)
| 
| mysql select count(*) from names where sld like
| 'sex%';
| +--+
| | count(*) |
| +--+
| |56033 |
| +--+
| 1 row in set (0.33 sec)
| 
| mysql select count(*) from names where sld like
| '%sex%';
| +--+
| | count(*) |
| +--+
| |   151460 |
| +--+
| 1 row in set (2 min 3.70 sec)
| 
| -
| RAID_CHUNKS=3
| 
| mysql select count(*) from names;
| +--+
| | count(*) |
| +--+
| | 30352536 |
| +--+
| 1 row in set (0.00 sec)
| 
| mysql select count(*) from names where sld like
| 'sex%';
| +--+
| | count(*) |
| +--+
| |55989 |
| +--+
| 1 row in set (0.39 sec)
| 
| mysql select count(*) from names where sld like
| '%sex%';
| +--+
| | count(*) |
| +--+
| |   151422 |
| +--+
| 1 row in set (14 min 59.83 sec)
| 
| -
| RAID_CHUNKS=5
| 
| mysql select count(*) from names;
| +--+
| | count(*) |
| +--+
| | 30352536 |
| +--+
| 1 row in set (0.00 sec)
| 
| mysql select count(*) from names where sld like
| 'sex%';
| +--+
| | count(*) |
| +--+
| |55989 |
| +--+
| 1 row in set (0.38 sec)
| 
| mysql select count(*) from names where sld like
| '%sex%';
| +--+
| | count(*) |
| +--+
| |   151422 |
| +--+
| 1 row in set (6 min 44.92 sec)
| 
| 
| -
| RAID_CHUNKS=15
| mysql select count(*) from names;
| +--+
| | count(*) |
| +--+
| | 30352536 |
| +--+
| 1 row in set (0.00 sec)
| 
| mysql select count(*) from names where sld like
| 'sex%';
| +--+
| | count(*) |
| +--+
| |55989 |
| +--+
| 1 row in set (0.39 sec)
| 
| 
| mysql select count(*) from names where sld like
| '%sex%';
| +--+
| | count(*) |
| +--+
| |   151422 |
| +--+
| 1 row in set (6 min 33.72 sec)
| 
| -
| 
| 
| This is running on a pretty wimpy box, but all ran
| several times so I was able to make sure the server was
| fully up. The box is a 750 PIII with 756M of RAM,
| running linux and the 3.23.44 version of mysql.
| 
| Any suggestions would be great.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Problem related to not equal to function

2001-11-15 Thread Michael Brunson

On Fri, 16 Nov 2001 10:41:31 +0530, Manish Mehta used a
few recycled electrons to form:
| Hello ,
| 
| I have a problem related to not  or != (not equal to function) .
| 
| The SQL Query is
| 
| select a.cBook_Name from tbl_bookmaster as a , tbl_empbookrelation  as b
| where a.nbook_id != b.nbook_id
| 
| It shows me wrong result. It shows me those rows also which are already
| present in other table.

You should use a left join, instead.

SELECT a.cBook_Name
 FROM
  tbl_bookmaster a LEFT JOIN tbl_empbookrelation b
 ON
  a.nbook_id = b.nbook_id
 WHERE
   b.nbook_id IS NULL

This is guessing that you want the records that are in
tbl_bookmaster, but not in tbl_empbookrelation.

HTH,
Michael



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php