Re: [PHP] OT - database and indexes... but anyone please?

2005-09-26 Thread Rory McKinley
Rory Browne wrote:
snipdeleting an index(a good index that
 is) would slow the db down in certain cases. Deleting a bad index
 would speed certain operations up.
snip


If the index in question happens to be a unique index or a primary key
(really just a special case of index) - you could be breaking the logic
of the table (allowing duplicates where there should be none).

Pretty much as Rory (the other one) said: An index makes write
operations slower and read operations faster. When you are doing bulk
inserts to a table it is often a good idea to drop any index , populate
the table and then re-index (for performance reasons).

Regards

Rory

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] OT - database and indexes... but anyone please?

2005-09-26 Thread Rory McKinley
Rory Browne wrote:
snip
If the index in question happens to be a unique index or a primary key
(really just a special case of index) - you could be breaking the logic
of the table (allowing duplicates where there should be none).
 
 
 Couldn't that only happen if you dropped a UNIQUE or PRIMARY KEY. Just
 to clarify, I only meant deleting, or dropping the index. Not the
 column that is indexed.
 
snippety

AFAIK, the unique /PK index is what avoids duplicates. So, if you
dropped the index, while your existing data would still be
duplicate-free, you would have no guarantees with regard to any data
that you might write to the table after you had dropped the index.

There was nothing wrong with your original answer(s) - I was just adding
a few wrinkles to it as the OP did not provide much info in terms of the
index that he was wishing to drop.

Regards

Rory

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] OT - database and indexes... but anyone please?

2005-09-26 Thread Chris W. Parker
Gustav Wiberg mailto:[EMAIL PROTECTED]
on Saturday, September 24, 2005 9:48 PM said:

 Thanx!

Ok so I had to look up and down that message 3 or 4 times before I found
this insignificant one line response. TRIM YOUR POSTS!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] OT - database and indexes... but anyone please?

2005-09-26 Thread Tim Van Wassenhove
On 2005-09-26, Rory McKinley [EMAIL PROTECTED] wrote:
 If the index in question happens to be a unique index or a primary key
 (really just a special case of index) 

I thought a primary key is something defined at the logical, where an
index is defined at the implementation level.. Therefore, a primary key
can't be a special case of an index.


-- 
Met vriendelijke groeten,
Tim Van Wassenhove http://timvw.madoka.be

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] OT - database and indexes... but anyone please?

2005-09-24 Thread Gustav Wiberg

Hi there!

This is not strictly PHP...

but if there's anyone out there with good knowledge of indexes, please mail 
me off-list.

My question: If I delete an index, what is the WORST thing that can happen?

/G
http://www.varupiraten.se/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] OT - database and indexes... but anyone please?

2005-09-24 Thread Rory Browne
I'm not an expert on databases, and I haven't a notion of mailing you
off-list, with information that could potentially benifit others as
well, but from my understanding, deleting an index(a good index that
is) would slow the db down in certain cases. Deleting a bad index
would speed certain operations up.

On 9/24/05, Gustav Wiberg [EMAIL PROTECTED] wrote:
 Hi there!

 This is not strictly PHP...

 but if there's anyone out there with good knowledge of indexes, please mail
 me off-list.
 My question: If I delete an index, what is the WORST thing that can happen?

 /G
 http://www.varupiraten.se/

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] OT - database and indexes... but anyone please?

2005-09-24 Thread Gustav Wiberg


- Original Message - 
From: Rory Browne [EMAIL PROTECTED]

To: Gustav Wiberg [EMAIL PROTECTED]
Cc: PHP General php-general@lists.php.net
Sent: Sunday, September 25, 2005 1:26 AM
Subject: Re: [PHP] OT - database and indexes... but anyone please?


I'm not an expert on databases, and I haven't a notion of mailing you
off-list, with information that could potentially benifit others as
well, but from my understanding, deleting an index(a good index that
is) would slow the db down in certain cases. Deleting a bad index
would speed certain operations up.

On 9/24/05, Gustav Wiberg [EMAIL PROTECTED] wrote:

Hi there!

This is not strictly PHP...

but if there's anyone out there with good knowledge of indexes, please 
mail

me off-list.
My question: If I delete an index, what is the WORST thing that can 
happen?


/G
http://www.varupiraten.se/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.6/111 - Release Date: 2005-09-23

Thanx!

/G
http://www.varupiraten.se/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php