Re: Table Structure

2008-05-15 Thread Ananda Kumar
it goes without saying 1. primary key and unique key would do unique scan which is fastest of all scan 2 Index would do range scan, which would be comparitivly slower. regards anandkl On 5/16/08, Krishna Chandra Prajapati <[EMAIL PROTECTED]> wrote: > > Hi, > > I would like to know which is f

Re: Table Structure

2008-05-15 Thread Krishna Chandra Prajapati
Hi, I would like to know which is faster out of the below. Primary Key Unique Key Indexing Give the numbering 1, 2 and 3 Thanks a lot On Thu, May 15, 2008 at 5:49 PM, Ananda Kumar <[EMAIL PROTECTED]> wrote: > If both (user_id,delivery_id) can be made primary key, then the second > index would

[Fwd: GRANT/REVOKE deny only 1 table in db from a user]

2008-05-15 Thread Philip M. Gollucci
[take 2] -- Philip M. Gollucci ([EMAIL PROTECTED]) o:703.549.2050x206 Senior System Admin - Riderway, Inc. http://riderway.com / http://ridecharge.com 1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C Work l

Re: Site Attack/Failure Recovery

2008-05-15 Thread John Comerford
I have worked as a DBA for a long time, just not with MySQL and I have spent a lot of time making sure the application is secure. I suppose my question was really what is the best way to do incremental backups? The DB I have most experience with has thing like after imaging etc. which allows

Re: reorder records in database

2008-05-15 Thread Rob Wultsch
On Thu, May 15, 2008 at 4:32 PM, C.R.Vegelin <[EMAIL PROTECTED]> wrote: > What about: > "ALTER TABLE > ORDER BY ;" > > HTH, Cor First off, please don't top post if a conversation is not already top posting. It is the custom of the group to bottom post... Your solution does not remove the gaps in

Re: reorder records in database

2008-05-15 Thread C.R.Vegelin
What about: "ALTER TABLE ORDER BY ;" HTH, Cor - Original Message - From: "Rob Wultsch" <[EMAIL PROTECTED]> To: "afan pasalic" <[EMAIL PROTECTED]> Cc: Sent: Thursday, May 15, 2008 8:23 PM Subject: Re: reorder records in database On Thu, May 15, 2008 at 11:38 AM, afan pasalic <[EMA

Re: reorder records in database

2008-05-15 Thread Rob Wultsch
On Thu, May 15, 2008 at 11:38 AM, afan pasalic <[EMAIL PROTECTED]> wrote: > is there built in function to "reset" order_no or I have to create php > script for it? There is not a built in way to do this. Using a user defined variable it is not all that hard to deal with though mysql> drop table i

Re: Trigger problem

2008-05-15 Thread Rob Wultsch
On Thu, May 15, 2008 at 2:30 AM, rustam ershtukaev <[EMAIL PROTECTED]> wrote: > I have been trying to write a trigger in mysql, but can't get it to > work. It's really simple,i just need my trigger to add varchar value to > a table on insert if postcode = 1000. > > this is how i did it: > > delimit

reorder records in database

2008-05-15 Thread afan pasalic
hi, I have a table with tasks. column "status" could be 1 (means "todo") and 0 (meas "done"). also,have column "order_no" to sort tasks by priorities. once in a while order_no is not "in order", e.g 1, 2, 3, 5, 6, 8, 11, 12, 13, 19, 20,... (some numbers are missing). is there built in function to

Res: MySQL purge logs

2008-05-15 Thread Wagner Bianchi
mysql> reset master; Wagner Bianchi Diretor de Tecnologia - INFODBA C&T [EMAIL PROTECTED] - (31) 3272 - 0226 / 9114 - 7695 - Mensagem original De: Kaushal Shriyan <[EMAIL PROTECTED]> Para: mysql@lists.mysql.com Cc: [EMAIL PROTECTED] Enviadas: Domingo, 11 de Maio de 2008 13:39:02 A

Res: Table Locking (Was: Best CPU config for a busy DB server)

2008-05-15 Thread Wagner Bianchi
Locking will ocours with MyISAM tables when INSERT, UPDATE, DELETE or REPLACE statemats arrive that tables, lock at the table level. In INNODB engine, a lock ocours at the row-level. BDB have lock at the page-level. Wagner Bianchi Diretor de Tecnologia - INFODBA C&T [EMAIL PROTECTED] - (31)

RE: Floor Decimal Math

2008-05-15 Thread John Trammell
> -Original Message- > From: Adam de Zoete [mailto:[EMAIL PROTECTED] On Behalf Of > Adam de Zoete > Sent: Thursday, May 15, 2008 6:24 AM > To: mysql@lists.mysql.com > Subject: Floor Decimal Math > > Hi, > > I'm running mysql 4.1.20 (Mac OS 10.4.11) and wondering why this ain't > returning t

RE: Floor Decimal Math

2008-05-15 Thread Jerry Schwartz
Don't feel bad, many an experience programmer has been bitten by this. The problem is that many decimal fractions do not have exact representations as binary fractions. .01 is an example of this. I'm not sure how MySQL does arithmetic internally, but (11.11 - 11) is just a hair under .11: mysql>

Re: Table Structure

2008-05-15 Thread Ananda Kumar
If both (user_id,delivery_id) can be made primary key, then the second index would not be required. But the performance of the query would be better if it reads one index rather than indexes on each COLUMN in the "WHERE CLAUSE" On 5/15/08, Krishna Chandra Prajapati <[EMAIL PROTECTED]> wrote: > > H

Re: Floor Decimal Math

2008-05-15 Thread wim . delvaux
On Thursday 15 May 2008 13:24:10 Adam de Zoete wrote: > Hi, > > I'm running mysql 4.1.20 (Mac OS 10.4.11) and wondering why this ain't > returning the right answer? Maybe i'm missing something or am i doing > something wrong? Perhaps it is performing FLOAT and not DECIMAL math. 11.11 is represent

Floor Decimal Math

2008-05-15 Thread Adam de Zoete
Hi, I'm running mysql 4.1.20 (Mac OS 10.4.11) and wondering why this ain't returning the right answer? Maybe i'm missing something or am i doing something wrong? mysql> select (11.11-FLOOR(11.11))>=0.11; ++ | (11.11-FLOOR(11.11))>=0.11 | +--

RE: replace chr(10) in field

2008-05-15 Thread Neil Tompkins
I've overcome the problem by using a RichText memo box. Thanks for your help in any case. Neil > From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC: mysql@lists.mysql.com> > Subject: RE: replace chr(10) in field> Date: Wed, 14 May 2008 19:18:07 +> > > I thought this, but when I display

Trigger problem

2008-05-15 Thread rustam ershtukaev
I have been trying to write a trigger in mysql, but can't get it to work. It's really simple,i just need my trigger to add varchar value to a table on insert if postcode = 1000. this is how i did it: delimiter | drop trigger testdep| create trigger testdep before insert on departements fo

Re: Site Attack/Failure Recovery

2008-05-15 Thread Rob Wultsch
On Wed, May 14, 2008 at 11:13 PM, John Comerford <[EMAIL PROTECTED]> wrote: > Quickly scanning this page, it doesn't seem to give syntax for an > incremental backup. I am hoping to be able to run something that dumps only > data changed since the last backup. > You could use diff and the previous

Problem with install DBD

2008-05-15 Thread Stefano Elmopi
Hi, I have installed MySQL on an Opteron 64bit with operating system Scientific Linux CERN SLC release 4.6 (Beryllium) by an archive TAR, under the directory /opt/local/mysql50. The problem is that I want to install drivers DBD to use MySQLBenchmark but i run perl Makefile.PL --mysql_config=