RE: Any way to make a "top ten" query?

2002-06-13 Thread Peter Romianowski
> > > SELECT * FROM myproducts ORDER BY sales LIMIT 11,10 > > > > will show place 11 to 20 > > Actually you want "LIMIT 10,10" for places 11 to 20, at least the way > most people count places. The LIMIT offset starts numbering the > records at 0, not 1. > > http://www.mysql.com/doc/S/E/SELE

RE: Any way to make a "top ten" query?

2002-06-13 Thread Peter Romianowski
Simply use LIMIT which is even more powerful than top, because you cannot only select the top ten best selling products but the number 11 to 20 as well :) Example: SELECT * FROM myproducts ORDER BY sales LIMIT 10 will show the top ten, and: SELECT * FROM myproducts ORDER BY sales LIMIT 11,10 w

RE: "dynamic table width"

2002-06-10 Thread Peter Romianowski
Hi Rob, thanks for your reply. > -Original Message- > From: Rob [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 10, 2002 2:57 PM > To: Peter Romianowski; [EMAIL PROTECTED] > Subject: Re: "dynamic table width" > > > As usual, there are several differe

"dynamic table width"

2002-06-10 Thread Peter Romianowski
Hi, I got a table with standard userdata (email, address). I want to be able to provide additional fields (like age, gender etc). Generally I have about 8 standard fields and up to 30 optional fields which may vary. Say something like this: Customer A wants its users to provide email, address an

replication and indexes

2002-04-18 Thread Peter Romianowski
Hi, I am using replication only for backup. My original database (MASTER) is using quite a lot of indexes. Currently my SLAVE has all the indexes too. I wonder if I can safely drop them on the SLAVE in order to increase replication-performance on the SLAVE? Are there pros and cons? Thanks, Pet

RE: Boolean!

2002-04-15 Thread Peter Romianowski
I use char(1) with 't' and 'f'. The JDBC-Driver I am using (mm.sql) recognizes this correctly as Boolean. Peter > -Original Message- > From: Jon Haworth [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 15, 2002 5:24 PM > To: 'T.Thiessens'; [EMAIL PROTECTED] > Subject: RE: Boolean! > >

RE: functions in mysql again

2002-04-12 Thread Peter Romianowski
this means that the select-statement did not return a row. try printing out the select-statement and execute it on the command-line. and add a "if ($result) {..." before using the result set. and: try finding a php-list. :-) > -Original Message- > From: Alia Mikati [mailto:[EMAIL PROTECT

RE: RE: check, analyze and optimize table

2002-04-09 Thread Peter Romianowski
> Yes you are right > We lock tables to run this but only when we have problems. > One more thing I would do is run 'show processlist' and mail it to my self > to see how thing are going. > Simon > PS have you tried mytop? No, I did not try mytop, but I'll give it a try now :) Another quest

check, analyze and optimize table

2002-04-09 Thread Peter Romianowski
Hi, I am writing a maintenance-deamon which is executing CHECK TABLE, ANALYZE TABLE and OPTIMIZE TABLE once at night. If CHECK TABLE fails for at least one table, then the rest will be skipped. The question is if the order of the statements is ok this way. A second question would be, if I should

Replication: Slave performance

2002-04-08 Thread Peter Romianowski
Hi there, currently I am using a single server for my webapp. Within the next days I get another box which will host the mysql-database (which is currently running on the other server). I want to set up replication between the 2 ones, using my current server as SLAVE and the new on as master. D

RE: MySQL Power ?

2002-04-05 Thread Peter Romianowski
just wanted to add another category of comparison: mysql is fast, reliable and scalable. that's a fact! we don't need to discuss this anymore. BUT: the sql-set is too limited for most of the real use cases out there. just think of the missing sub-selects or multitable-updates/deletes or stored pr