question about Queries per second avg

2007-04-06 Thread C.R.Vegelin
Hi List,

Using printf( System status: %s\n, mysqli_stat($link));
in a PHP script, says: Queries per second avg: 0.051.
This means that a query takes about 20 seconds ?
But the query result is given immediately.
How should I interpret Queries per second avg ?
I'm using version 5.0.15 NT.

Regards, Cor


Re: question about Queries per second avg

2007-04-06 Thread Christophe Gregoir

C.R.Vegelin wrote:

...
How should I interpret Queries per second avg ?
  



How about as 'queries per second on average' :)

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



Re: question about Queries per second avg

2007-04-06 Thread C.R.Vegelin

Thanks Christophe,

Question rephrased: 
how do you explain 0.05 q/s = 20 s/q

with an immediate response ?

Cor

- Original Message - 
From: Christophe Gregoir [EMAIL PROTECTED]

To: C.R.Vegelin [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Sent: Friday, April 06, 2007 8:35 AM
Subject: Re: question about Queries per second avg



C.R.Vegelin wrote:

...
How should I interpret Queries per second avg ?
  



How about as 'queries per second on average' :)




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



Re: question about Queries per second avg

2007-04-06 Thread Christophe Gregoir

I have to admit, Google doesn't provide much information.
Let's take a closer look and see if we can't figure out ourselves what 
that value means.


Here is the output of `mysqladmin status` on my development box:
 Uptime: 7510  Threads: 3  Questions: 4123  Slow queries: 0  Opens: 
713  Flush tables: 1  Open tables: 64  Queries per second avg: 0.549


The number of queries would be Questions + Slow queries.
See if you can spot where mysqladmin gets its time count and use it to 
divide the previous sum.


Your box isn't underperforming, it just isn't under a high load.

Question answered ?


grtz




C.R.Vegelin wrote:

Thanks Christophe,

Question rephrased: how do you explain 0.05 q/s = 20 s/q
with an immediate response ?

Cor

- Original Message - From: Christophe Gregoir 
[EMAIL PROTECTED]

To: C.R.Vegelin [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Sent: Friday, April 06, 2007 8:35 AM
Subject: Re: question about Queries per second avg



C.R.Vegelin wrote:

...
How should I interpret Queries per second avg ?
  



How about as 'queries per second on average' :)







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



Re: question about Queries per second avg

2007-04-06 Thread Christophe Gregoir

Ofcourse, the number of queries is just the value of Questions.

Christophe Gregoir wrote:

I have to admit, Google doesn't provide much information.
Let's take a closer look and see if we can't figure out ourselves what 
that value means.


Here is the output of `mysqladmin status` on my development box:
 Uptime: 7510  Threads: 3  Questions: 4123  Slow queries: 0  Opens: 
713  Flush tables: 1  Open tables: 64  Queries per second avg: 0.549


The number of queries would be Questions + Slow queries.
See if you can spot where mysqladmin gets its time count and use it to 
divide the previous sum.


Your box isn't underperforming, it just isn't under a high load.

Question answered ?


grtz




C.R.Vegelin wrote:

Thanks Christophe,

Question rephrased: how do you explain 0.05 q/s = 20 s/q
with an immediate response ?

Cor

- Original Message - From: Christophe Gregoir 
[EMAIL PROTECTED]

To: C.R.Vegelin [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Sent: Friday, April 06, 2007 8:35 AM
Subject: Re: question about Queries per second avg



C.R.Vegelin wrote:

...
How should I interpret Queries per second avg ?
  



How about as 'queries per second on average' :)










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



Re: question about Queries per second avg

2007-04-06 Thread Micah Stevens
It's just telling you how many queries per second on average the server 
is receiving. This says nothing about how long it takes to execute a 
particular query.


-Micah

On 04/06/2007 01:22 AM, C.R.Vegelin wrote:

Hi List,

Using printf( System status: %s\n, mysqli_stat($link));
in a PHP script, says: Queries per second avg: 0.051.
This means that a query takes about 20 seconds ?
But the query result is given immediately.
How should I interpret Queries per second avg ?
I'm using version 5.0.15 NT.

Regards, Cor

  


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



regional keyboards

2007-04-06 Thread balaraju mandala

Hi All,

What data will be inserted if some users use regional keyboards(like
Chineese or French characters supported).
Is my validation conditations will work for those?

I mean recently i observed that some registered users for our
application violated validation rules. Some users give single characters as
passwords(min 6 need to give) and they did not given email id(email should
not be a blank field). What can be the reasone?. The data will be directly
inserted to mysql database.


Re: regional keyboards

2007-04-06 Thread Ananda Kumar

Hi Balaraju,
The validation should be enforced by your application.
You should not allow users to have proceed further if they dont give email's
or passwords less than 6 characters.

regards
anandkl

On 4/6/07, balaraju mandala [EMAIL PROTECTED] wrote:


Hi All,

What data will be inserted if some users use regional keyboards(like
Chineese or French characters supported).
Is my validation conditations will work for those?

I mean recently i observed that some registered users for our
application violated validation rules. Some users give single characters
as
passwords(min 6 need to give) and they did not given email id(email should
not be a blank field). What can be the reasone?. The data will be directly
inserted to mysql database.



Re: question about Queries per second avg

2007-04-06 Thread Mogens Melander
My idea of this is :

(Questions+Slow queries)/Uptime = Queries per second avg

(118794 + 16) / 84751) = 1,4018713643496831895788840249673

Uptime: 84751  Threads: 2  Questions: 118794  Slow queries: 16
  Opens: 478  Flush tables: 1  Open tables: 29
  Queries per second avg: 1.402

-- 
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224


On Fri, April 6, 2007 10:16, Christophe Gregoir wrote:
 I have to admit, Google doesn't provide much information.
 Let's take a closer look and see if we can't figure out ourselves what
 that value means.

 Here is the output of `mysqladmin status` on my development box:
   Uptime: 7510  Threads: 3  Questions: 4123  Slow queries: 0  Opens:
 713  Flush tables: 1  Open tables: 64  Queries per second avg: 0.549

 The number of queries would be Questions + Slow queries.
 See if you can spot where mysqladmin gets its time count and use it to
 divide the previous sum.

 Your box isn't underperforming, it just isn't under a high load.

 Question answered ?


 grtz




 C.R.Vegelin wrote:
 Thanks Christophe,

 Question rephrased: how do you explain 0.05 q/s = 20 s/q
 with an immediate response ?

 Cor

 - Original Message - From: Christophe Gregoir
 [EMAIL PROTECTED]
 To: C.R.Vegelin [EMAIL PROTECTED]
 Cc: mysql@lists.mysql.com
 Sent: Friday, April 06, 2007 8:35 AM
 Subject: Re: question about Queries per second avg


 C.R.Vegelin wrote:
 ...
 How should I interpret Queries per second avg ?



 How about as 'queries per second on average' :)





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


 --
 This message has been scanned for viruses and
 dangerous content by OpenProtect(http://www.openprotect.com), and is
 believed to be clean.




-- 
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.


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



RE: question about Queries per second avg

2007-04-06 Thread Jerry Schwartz
It says nothing about how long it takes to process a query (service time);
it tells you on average how often queries come in (arrival rate). If the
service time is such that an arriving query is finished before the next one
arrives, you aren't in terrible shape as far as the queue of waiting queries
goes. If queries arrive while the previous query is still being served, then
all is lost because the queue will grow to infinity.

That's a very simplistic overview, there's an entire branch of statistics
devoted to this sort of thing.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


 -Original Message-
 From: C.R.Vegelin [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 06, 2007 4:46 AM
 To: Christophe Gregoir
 Cc: mysql@lists.mysql.com
 Subject: Re: question about Queries per second avg

 Thanks Christophe,

 Question rephrased:
 how do you explain 0.05 q/s = 20 s/q
 with an immediate response ?

 Cor

 - Original Message -
 From: Christophe Gregoir [EMAIL PROTECTED]
 To: C.R.Vegelin [EMAIL PROTECTED]
 Cc: mysql@lists.mysql.com
 Sent: Friday, April 06, 2007 8:35 AM
 Subject: Re: question about Queries per second avg


  C.R.Vegelin wrote:
  ...
  How should I interpret Queries per second avg ?
 
 
 
  How about as 'queries per second on average' :)
 


 --
 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: append information

2007-04-06 Thread J.R. Bullington
CONCAT_WS() works as well, but the format is still the same. You still want to 
add your new data to your old data.

UPDATE tmpTable SET Textarea = CONCAT_WS(',',Textarea,'data you wish to add') 
WHERE ID = someID

Just remember to make the delimiter something that you wouldn't normally see in 
a textfield so that you can differentiate between the new text and the old text.

J.R.


From: sam rumaizan [EMAIL PROTECTED]
Sent: Friday, April 06, 2007 12:31 PM
To: [EMAIL PROTECTED]
Subject: re: append information 

How About CONCAT_WS()

J.R. Bullington [EMAIL PROTECTED] wrote:  
Use the CONCAT() function to achieve this:

UPDATE tmpTable SET Textarea = concat(Textarea,'data you wish to add') WHERE ID 
= someID

HTH!



From: sam rumaizan 
Sent: Thursday, April 05, 2007 12:23 PM
To: mysql@lists.mysql.com
Subject: append information 

I have a question if you don't mind.
The update statement will replace the existing information. What if I 
have Textarea instead and I want to add information to the field 
without erasing previous information. Basically append information

-
Looking for earth-friendly autos? 
Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.


Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.



Query to return Multiple values in a field?

2007-04-06 Thread Jesse

Using MySQL 5.0.22-community-nt-log

Is there a way to compose a query that would show multiple values in field? 
In other words, I have a table structure like this:


Activity 1
  Section 1
 Schedule 1
 Schedule 2
  Section 2
 Schedule 1
Activity 2
  Section 1
 Schedule 1
 Schedule 2

So, I would like to return a query that shows the activity name, section #, 
and in a single field, all the schedule entries.  Just to see if it would 
work, I did the following query:


SELECT S.*, CONCAT(C.FirstName,' ',C.LastName) AS CounselorName,
  (SELECT Count(*) FROM CamperActivitySelections WHERE SectionID=S.ID) 
AS Cap,
  (SELECT StartDateTime FROM SectionSchedule SS WHERE 
SS.SectionID=S.ID) As Sh

FROM Sections S LEFT JOIN Counselors C ON C.ID=S.CounselorID
WHERE ActivityID=65

This works fine if there is only one schedule entry.  However, when there 
are two schedule entries or more, it returns an empty data set.  If there 
were some way to get the results and add them all together, separated by a 
br, that would be perfect.  Just make that the field value, which I 
could then display. The only other alternative is to put this into a loop in 
my program and create a query for each row to get the schedule information.


Any help is appreciated.

Thanks,
Jesse 



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



RE: Query to return Multiple values in a field?

2007-04-06 Thread Jerry Schwartz
I'm not sure this will work for you, but look at the GROUP BY clause and the
GROUP_CONCAT() function.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


 -Original Message-
 From: Jesse [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 06, 2007 1:17 PM
 To: MySQL List
 Subject: Query to return Multiple values in a field?

 Using MySQL 5.0.22-community-nt-log

 Is there a way to compose a query that would show multiple
 values in field?
 In other words, I have a table structure like this:

 Activity 1
Section 1
   Schedule 1
   Schedule 2
Section 2
   Schedule 1
 Activity 2
Section 1
   Schedule 1
   Schedule 2

 So, I would like to return a query that shows the activity
 name, section #,
 and in a single field, all the schedule entries.  Just to see
 if it would
 work, I did the following query:

 SELECT S.*, CONCAT(C.FirstName,' ',C.LastName) AS CounselorName,
(SELECT Count(*) FROM CamperActivitySelections WHERE
 SectionID=S.ID)
 AS Cap,
(SELECT StartDateTime FROM SectionSchedule SS WHERE
 SS.SectionID=S.ID) As Sh
 FROM Sections S LEFT JOIN Counselors C ON C.ID=S.CounselorID
 WHERE ActivityID=65

 This works fine if there is only one schedule entry.
 However, when there
 are two schedule entries or more, it returns an empty data
 set.  If there
 were some way to get the results and add them all together,
 separated by a
 br, that would be perfect.  Just make that the field
 value, which I
 could then display. The only other alternative is to put this
 into a loop in
 my program and create a query for each row to get the
 schedule information.

 Any help is appreciated.

 Thanks,
 Jesse


 --
 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: Query to return Multiple values in a field?

2007-04-06 Thread Jesse

I'm not sure this will work for you, but look at the GROUP BY clause and
the
GROUP_CONCAT() function.


That was exactly what I needed!  I converted my query as follows, and I'm
getting exactly what I was looking for:

SELECT S.*, CONCAT(C.FirstName,' ',C.LastName) AS CounselorName,
  (SELECT Count(*) FROM CamperActivitySelections WHERE SectionID=S.ID)
AS Cap,
  CONVERT(GROUP_CONCAT(StartDateTime ORDER BY StartDateTime SEPARATOR
'br'),Char) As Sh
FROM Sections S
  LEFT JOIN Counselors C ON C.ID=S.CounselorID
  LEFT JOIN (SELECT SectionID,StartDateTime FROM SectionSchedule SS) As SS
ON SS.`SectionID`=S.ID
WHERE ActivityID=65
GROUP BY S.ID

THANKS FOR THE HELP!

Jesse 



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



RE: append information

2007-04-06 Thread J.R. Bullington
Sam -- 
 
Please use REPLY-ALL when sending email to the list.
 
Can you use \t? I don't think so. 
 
I know that if you want to enter in '\t', you will need to escape it '\\t',
but MySQL may treat that as something else. It may treat it as a TAB in its
own right, as I know that it will replace '\\r' with a Carriage Return in
BLOB and TEXT fields.
 
You should use something like pipe '|', brace '[', or bracket '{' and then
use code to do a replace().
 
You should try it though, as I have not. It may work just fine, but your
application code is really the way you want to do this.
 
J.R.
 
 
 
 
 
1-Can I use Tab (\t) instead?
2- Can I insert the date this new data was added to the field?

J.R. Bullington [EMAIL PROTECTED] wrote: 

CONCAT_WS() works as well, but the format is still the same. You still want
to add your new data to your old data.

UPDATE tmpTable SET Textarea = CONCAT_WS(',',Textarea,'data you wish to
add') WHERE ID = someID

Just remember to make the delimiter something that you wouldn't normally see
in a textfield so that you can differentiate between the new text and the
old text.

J.R.


From: sam rumaizan 
Sent: Friday, April 06, 2007 12:31 PM
To: [EMAIL PROTECTED]
Subject: re: append information 

How About CONCAT_WS()

J.R. Bullington wrote: 
Use the CONCAT() function to achieve this:

UPDATE tmpTable SET Textarea = concat(Textarea,'data you wish to add') WHERE
ID = someID

HTH!



From: sam rumaizan 
Sent: Thursday, April 05, 2007 12:23 PM
To: mysql@lists.mysql.com
Subject: append information 

I have a question if you don't mind.
The update statement will replace the existing information. What if I 
have Textarea instead and I want to add information to the field 
without erasing previous information. Basically append information

-
Looking for earth-friendly autos? 
Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.


Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.






 


  _  

Looking for earth-friendly autos? 
Browse
http://autos.yahoo.com/green_center/;_ylc=X3oDMTE4MGw4Z2hlBF9TAzk3MTA3MDc2B
HNlYwNtYWlsdGFncwRzbGsDZ3JlZW5jZW50ZXI- Top Cars by Green Rating at
Yahoo! Autos' Green Center.