Re: Database Creation

2008-09-22 Thread Arjan Hulshoff
Hi Andrew,

You can do this with MySQL Administrator, but you have to look for
Catalogs in the left pane. After that right click in the bottom part of
the left pain and select 'Create Schema'. Provide a database name and
click on ok. That should do the trick.

Arjan


On Sun, 2008-09-21 at 21:26 -0700, AndrewMcHorney wrote:

 Hello
 
 I now sucessfully connected to the MqSQL Administrator tool. I had in 
 fact a password for the root user. I now would like to create a new 
 database. II do not see how to do this in the adminstrator tool. Is 
 there a tool that I can use to create the database. I would prefer a 
 gui type approach rather than the typical create table stuff.
 
 Andrew
 
 


Patch for mysql

2008-09-22 Thread Nagaraj S
Hi Gurus,

Good Day! How to apply mysql bug fixing patches or it is just updating or
replacing some code in a c file and recompiling the source?
Anyone able to supply some simple steps to patch instructions?  I have mysql
server running on Solaris 10 system.

Thanks. Naga..


Re: Patch for mysql

2008-09-22 Thread Colin Charles

Nagaraj S wrote:

Hi Gurus,

Good Day! How to apply mysql bug fixing patches or it is just updating or
replacing some code in a c file and recompiling the source?


Depending on how your patch looks like, you will use the Unix patch(1) 
utility or not



Anyone able to supply some simple steps to patch instructions?  I have mysql
server running on Solaris 10 system.


Why not just use the method that Solaris provides to update the MySQL 
package?


Applying patches requires you to recompile MySQL, and if you're already 
curious about how to apply a patch (and you're not clear what patch this 
might be), I'd avoid this method of getting things done



--
Colin Charles, http://bytebot.net/blog/

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



Re: Patch for mysql

2008-09-22 Thread David Ashley
On Mon, Sep 22, 2008 at 7:54 AM, Colin Charles [EMAIL PROTECTED]wrote:

 Nagaraj S wrote:

 Hi Gurus,

 Good Day! How to apply mysql bug fixing patches or it is just updating or
 replacing some code in a c file and recompiling the source?


 Depending on how your patch looks like, you will use the Unix patch(1)
 utility or not

 Anyone able to supply some simple steps to patch instructions?  I have
 mysql
 server running on Solaris 10 system.


 Why not just use the method that Solaris provides to update the MySQL
 package?

 Applying patches requires you to recompile MySQL, and if you're already
 curious about how to apply a patch (and you're not clear what patch this
 might be), I'd avoid this method of getting things done

One possible ambiguity is that patch means different things to different
people.

To hard-core *nix users, patch strictly means the behavior of the patch
program (man patch).

However, to certain others, patch may mean any bugfix mechanism (updates).

I suspect that the OP used patch when the lingo of the list would have
been update.


Ancient, unsolved high-CPU problem

2008-09-22 Thread Rene Fournier
For the longest time, I've had a strange problem with MySQL.  
Basically, after a certain amount of time--sometimes a few days,  
sometimes a couple weeks--its CPU usage will go from a steady 20-30%  
to 80-90%. Actual load and number of queries is the same, nothing else  
changes.


If I shutdown MySQL and restart it (not the server), CPU% goes back to  
normal. What could this be?


(Xserve G5 2GHz, 8GB, 3x250GB RAID5, Mac OS X 10.4.11, MySQL 5.0.51a)

...Rene

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



Complex SELECT

2008-09-22 Thread Andre Matos

Hello,

I need help with a SQL Select statement:

I have three tables: report, category, and optional

a) report table has 3 fields:

ReportId, CategoryId, ReportDesc

b) category table has 2 fields:

CategoryId, CategoryDesc

c) optional table has three fields:

OptionalId, CategoryId, OptionalDesc


I would like to have something like this:

---
| ReportId | CategoryDesc |  OptionalDesc   | ReportDesc|
---
|   0001 | Example 1| late, query, test |  report desc abc |
|   0002 | Example 2| query  | test  
123|
|   0003 | Example 3| | test  
xzy |
|   0004 | Example 1| late, test |  report  
desc abc |

---

However, when performing my SELECT using LEFT JOIN, I am getting  
something like this:


---
| ReportId | CategoryDesc |  OptionalDesc   | ReportDesc|
---
|   0001 | Example 1| late  |  report  
desc abc |
|   0001 | Example 1| query  |  report  
desc abc |
|   0001 | Example 1| test  |  report  
desc abc |
|   0002 | Example 2| query  | test  
123|
|   0003 | Example 3| | test  
xzy |
|   0004 | Example 1| late |  report  
desc abc |
|   0004 | Example 1| test |  report  
desc abc |

---


Is it possible to have the column OptionalDesc as showed in the  
first table above?


Thanks for any help.

Andre

--
Andre Matos
[EMAIL PROTECTED]




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



Re: Ancient, unsolved high-CPU problem

2008-09-22 Thread Rene Fournier
Uptime: 1054977  Threads: 10  Questions: 15576766  Slow queries: 229   
Opens: 489  Flush tables: 1  Open tables: 483  Queries per second avg:  
14.765




I know what the slow queries are--some that take 20-30 seconds to  
compute, and they are normal. The number of open tables seems high,  
no? The database that gets 95% of the load has ~35 tables in total.


As for cron jobs, I have a number of command-line PHP scripts that  
perform regular queries. They've been running for about 10 days now.  
The current high CPU state started a couple days ago.





On 22-Sep-08, at 8:30 PM, Martin Gainty wrote:


curious if you have any cron jobs starting to execute?

what does mysqladmin status show ?

Martin
__
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the  
official business of Sender. This transmission is of a confidential  
nature and Sender does not endorse distribution to any party other  
than intended recipient. Sender does not necessarily endorse content  
contained within this transmission.



 From: [EMAIL PROTECTED]
 To: mysql@lists.mysql.com
 Subject: Ancient, unsolved high-CPU problem
 Date: Mon, 22 Sep 2008 19:41:25 +0200

 For the longest time, I've had a strange problem with MySQL.
 Basically, after a certain amount of time--sometimes a few days,
 sometimes a couple weeks--its CPU usage will go from a steady 20-30%
 to 80-90%. Actual load and number of queries is the same, nothing  
else

 changes.

 If I shutdown MySQL and restart it (not the server), CPU% goes  
back to

 normal. What could this be?

 (Xserve G5 2GHz, 8GB, 3x250GB RAID5, Mac OS X 10.4.11, MySQL  
5.0.51a)


 ...Rene

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


Get more out of the Web. Learn 10 hidden secrets of Windows Live.  
Learn Now




Re: Complex SELECT

2008-09-22 Thread Jim Lyons
look at using the group_concat function on OptionalDesc and group by the
other fields.

On Mon, Sep 22, 2008 at 1:40 PM, Andre Matos [EMAIL PROTECTED]wrote:

 Hello,

 I need help with a SQL Select statement:

 I have three tables: report, category, and optional

 a) report table has 3 fields:

 ReportId, CategoryId, ReportDesc

 b) category table has 2 fields:

 CategoryId, CategoryDesc

 c) optional table has three fields:

 OptionalId, CategoryId, OptionalDesc


 I would like to have something like this:


 ---
 | ReportId | CategoryDesc |  OptionalDesc   | ReportDesc|

 ---
 |   0001 | Example 1| late, query, test |  report desc abc |
 |   0002 | Example 2| query  | test 123
|
 |   0003 | Example 3| | test xzy
   |
 |   0004 | Example 1| late, test |  report desc abc
 |

 ---

 However, when performing my SELECT using LEFT JOIN, I am getting something
 like this:


 ---
 | ReportId | CategoryDesc |  OptionalDesc   | ReportDesc|

 ---
 |   0001 | Example 1| late  |  report desc
 abc |
 |   0001 | Example 1| query  |  report desc abc
 |
 |   0001 | Example 1| test  |  report desc
 abc |
 |   0002 | Example 2| query  | test 123
|
 |   0003 | Example 3| | test xzy
   |
 |   0004 | Example 1| late |  report desc
 abc |
 |   0004 | Example 1| test |  report desc
 abc |

 ---


 Is it possible to have the column OptionalDesc as showed in the first
 table above?

 Thanks for any help.

 Andre

 --
 Andre Matos
 [EMAIL PROTECTED]




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




-- 
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com


Re: Complex SELECT

2008-09-22 Thread Andre Matos

It worked like a charm.

Thanks for the help!

Andre


On 22-Sep-08, at 2:58 PM, Jim Lyons wrote:

look at using the group_concat function on OptionalDesc and group  
by the other fields.


On Mon, Sep 22, 2008 at 1:40 PM, Andre Matos [EMAIL PROTECTED] 
 wrote:

Hello,

I need help with a SQL Select statement:

I have three tables: report, category, and optional

a) report table has 3 fields:

ReportId, CategoryId, ReportDesc

b) category table has 2 fields:

CategoryId, CategoryDesc

c) optional table has three fields:

OptionalId, CategoryId, OptionalDesc


I would like to have something like this:

---
| ReportId | CategoryDesc |  OptionalDesc   | ReportDesc|
---
|   0001 | Example 1| late, query, test |  report desc  
abc |
|   0002 | Example 2| query  | test  
123|
|   0003 | Example 3| | test  
xzy |
|   0004 | Example 1| late, test |  report  
desc abc |

---

However, when performing my SELECT using LEFT JOIN, I am getting  
something like this:


---
| ReportId | CategoryDesc |  OptionalDesc   | ReportDesc|
---
|   0001 | Example 1| late  |   
report desc abc |
|   0001 | Example 1| query  |  report  
desc abc |
|   0001 | Example 1| test  |   
report desc abc |
|   0002 | Example 2| query  | test  
123|
|   0003 | Example 3| | test  
xzy |
|   0004 | Example 1| late |  report  
desc abc |
|   0004 | Example 1| test |  report  
desc abc |

---


Is it possible to have the column OptionalDesc as showed in the  
first table above?


Thanks for any help.

Andre

--
Andre Matos
[EMAIL PROTECTED]




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




--
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com


--
Dr. André Matos
[EMAIL PROTECTED]





Relational Databasing on busy webserver

2008-09-22 Thread Ben A.H.
Hello,

We are setting up a relatively common web application which collects user 
information... Right off the bat our system will have over 200,000 USER 
RECORDS so having an efficient database  lookup scheme is critical.
I am a programmer/developer with some education in databasing but my forte 
is programming hence this odd (I think) question...

Obviously we'll have the standard USER table  a bunch of supporting tables.

For items like STATE/PROVINCE standard database logic would dictate I setup:

USER
   name
   email
   .etc...
   StateID  (foreign key)


STATE
   StateID
   StateName

But I often wonder if there's any benefit in having a State table...

For one, new States/Provinces are not that likely, removal of these entities 
is also unlikely (except maybe Quebec :-)) so the chances of having to make 
alternations to the State table near nil. It raises the question of whether 
or not a State Table is even necessary.
Using a traditional SQL State table, I'd have to do an SQL query to populate 
User State/Province options every time the New User Registration form is 
shown - isn't this needless overhead?!
Would my webforms not load faster if State/Province information was 
hard-coded as options for a combobox? Is this something people have 
experimented with?

There are various other fields that I believe could be handled like this for 
a cumulative performance boost. For example: country, state/province, 
gender, industry, occupation, ethnicity, language are all options that 
aren't going to change that often. Then again, when we do have to display 
the users choice; for example if user.countryID=3 we'd have to have a way to 
turn that number 3 into the word Canada when we display the users 
profile... I'd probably do this via XML lookup.

Has anyone experimented with the benefits/tradeoffs of such a scheme? As 
I've said, we are dealing with at least 200,000 user records, probably 
300,000-400,000 in the next year. The User table contains at least 50 
attributes, 15 of which are Foreign Keys that link to tables that will 
likely never change (the users choices for countryID, stateID, 
OperatingSystemID, internet_connectionTypeID, internetUserFrequencyID, 
industryID, occupationID)...

ThanX in advance
Ben



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