not for speed, but i defitively prefer your second query. Reason for this is
simple: you name the field you want to insert.

with your first query, if you'd ever alter the table you would have to check
all your source code that interacts with this table.

speed difference should be very minimal anyhow, since it's only the parser's
speed making some diff in speed, whereas your actual delay is in the writing
of the data to disk.

regards,

rene

----- Original Message -----
From: "Bryan Wheelock" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2001 3:19 PM
Subject: fastest queries


> I'm working on a MySQL db and I was just curious what type of query was
> faster.
>
> e.g.
> I have this table1
> id (auto# primary key) |  date| Name | address | email
>
> I want to insert a new name into the DB.
> Which method would be faster?
> 1.
> INSERT INTO table1 VALUES(null,null,'Bryan',null,null);
>
> 2.
> INSERT INTO table1( name ) VALUES('Bryan');
>
> Thanks,
> Bryan
>
>
> ---------------------------------------------------------------------
> 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

Reply via email to