FW: Merge Tables Across Databases

2002-12-14 Thread Lou Scalpati
Can you create a merge table whose component tables exist in other
databases? I am able to create merge tables for tables that are in one
database but I want to be able to aggregate data from multiple
databases.  I am using 3.23 but I am migrating to 4.0.5a next week, if
that makes a difference.  The following is an example of what I am
trying to do:

Database Name: cust1
Table Name:  logs

Database Name: cust2
Table Name: logs

Database Name: all

CREATE TABLE all.combined_logs (column defs here)
TYPE=MERGE UNION=(cust1.logs, cust2.logs) INSERT_METHOD=NO;

Thanks

Lou

Query, sql -- to defeat the spam filter

-
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: E-Commerce, db-clustering and MySQL?

2002-12-08 Thread Lou Scalpati
Bjorn - you state to use auto_increment in 2-way replication.  Others have
said that this could cause a crash if the auto_increment field is
duplicated.  Have experienced any problems with it?


- Original Message -
From: Björn Pålsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 08, 2002 3:14 PM
Subject: Re: E-Commerce, db-clustering and MySQL?


 First, I wish to say that you are making the right descision leaving M$
and
 taking a step into MySQL.

 Currently, I'm working on a project involving +500.000 rows and estimated
 30.000 visitors / day on a 2 x dual 2.8 GHz Xeon dedicated for SQL.
 Additional servers are for HTTP and other tasks. There will be a lot of
 load on the SQL when the users searches our database on either category,
 area or on a fulltext keyword.

 The key to managing thousands of visitors is to have a system setup to
 minimize the number of querys and managing the traffic between the
diffrent
 machines. We will use a second gigabit-switch and a secondary net on the
 10.0.0.0 to unload our primary public switch. We also have pre-cached
pages
 with the most popular products/listings. In our case, the visitor may
input
 data and therefore he will trigger a re-cache. A separate machine is used
 for this purpose as this may happen very often.

 To make a user allowed to input data you must setup the servers in a ring
 with each server acting as both master and slave. If you have a clean
 system with very few inserts/updates you may choose a simpler solution
with
 a single master an several slaves f.x. if the only insert is in the
 checkout in a webshop. If you have click counters, this simple solution
 will fall.

 If you have the ring-solution, you must make shure your script never makes
 any contradicting inserts. Use auto_increment if possible when inserting
 and/or use your session-id as an identifier. Always use relative updates
 when you must update a value.

 Do not write

 SELECT count from article WHERE id = '$id'

 $count++

 UPDATE count set count = '$count' WHERE id = '$id'

 but use

 UPDATE count = count + 1

 All these things to think about will force you to dig deep into your
script
 and if you have a script-in-a-box solution from a third party coder, you
 are definately in a difficult situation. If you know your script well, you
 will have an easier task.

 Please tell me about your future findings!

 Greets

 Hello:
 
 We are running a large e-commerce site currently with ASP/MSSQL. The ever
 increasing number of hits, complexity of the site and request for
reporting
 is slowly but surely bringing us to the point were the current database
 application is getting tired.
 
 Now we're thinking Linux, MySQL and clustering.
 
 I have been looking around a little and don't like the fact that there
are
 no stored procedures and no triggers. However - if we cluster several
quad
 processor machines we should be fine without.
 
 Right now it's all theory, and there don't seem to be a lot of articles
on
 the web about this. At least I had no luck finding any.
 
 Does anybody have real life experiences with this kind of a setup? Does
 anybody know where to find reports about this?
 
 I'd be greatful for any link or hint!
 
 Dietrich Speer
 
 


 -
 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: Two-Way Replication

2002-12-07 Thread Lou Scalpati
I have read 4.10.7 and the only caveat stated is that updates can occur
in different orders on the different servers.  Each of my updates are
autonomous and that should not be a problem.  Are there any other
gotchas I should be concerned about.  I saw a posting the stated not to
turn on log-slave-updates and that auto increment fields can cause
problems.



On Fri 2002-12-06 at 15:35:53 -0600, [EMAIL PROTECTED] wrote:
 
 I am new to this list and have not been able to find an answer in the 
 searchable archive, So I am sorry if this question has been asked 
 before.
 
 The documentation (section 4.10.7) mentions 2 way replication but does

 not give any information about how to set it up.

Well, that is probably, because it has its problems and is not
recommended by default (as section 4.10.7 explained).

 I have searched the documentation and the site.  Any pointers for more

 information would be great.

Their is nothing special about it. Simply set up both sides as master
and slaves:

Set up A and B as master-slave pair according to the documentation. Then
set up a B as a master, additionally (assuring that the server-id is
different from A) and then start A as slave. Done.

The issue about server-id is explained in
http://www.mysql.com/doc/en/Replication_Options.html

HTH,

Benjamin.


-- 
[EMAIL PROTECTED]

-
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




Two-Way Replication

2002-12-06 Thread Lou Scalpati

I am new to this list and have not been able to find an answer in the
searchable archive, So I am sorry if this question has been asked
before.

The documentation (section 4.10.7) mentions 2 way replication but does
not give any information about how to set it up.  I have searched the
documentation and the site.  Any pointers for more information would be
great.

MySql Version 4.05a
Thanks

Lou

Sql query - so it passes through the spam filter.

-
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