Forums / General Questions / The following indexes appear to be equal and one of them should be removed warning

The following indexes appear to be equal and one of them should be removed warning

Started by nadsab on 12 Mar 2012, 9:42 PM · Views: 2,088

Results 1 to 9 of 9
12 Mar 2012, 9:42 PM
#1
nadsab avatar

nadsab

Totally Zenned

Join Date:
Sep 2004
Posts:
496
Plugin Contributions:
0

The following indexes appear to be equal and one of them should be removed warning

Quick question,

I am learning phpMyAdmin to learn backups etc, today is the first time I accessed my ZC database using it. This is an empty freshly created ZC database on a new install, ZC 1.5

By mistake I clicked the "Index" action button for the products_id field in the products table, after clicking on the structure icon for the products table, and now I have warning message at screen bottom which says:

The following indexes appear to be equal and one of them should be removed: PRIMARY, products_id.

I am assuming I added a redundant index entry in the table that I need to delete; Can anyone tell me what I need to do here to correct?

Thanks so much.

Happy to be a Zen Cart Monthly Donor! :)

12 Mar 2012, 10:27 PM
#2
nadsab avatar

nadsab

Totally Zenned

Join Date:
Sep 2004
Posts:
496
Plugin Contributions:
0

Re: The following indexes appear to be equal and one of them should be removed warning

So....under the heading in phpMyAdmin : > Documentation Keyname Type Cardinality Action Field

I have the below...

PRIMARY PRIMARY 0 Edit Drop products_id
idx_products_date_added_zen INDEX None Edit Drop products_date_added
idx_products_status_zen INDEX None Edit Drop products_status
idx_products_date_available_zen INDEX None Edit Drop products_date_available
idx_products_ordered_zen INDEX None Edit Drop products_ordered
idx_products_model_zen INDEX None Edit Drop products_model
idx_products_price_sorter_zen INDEX None Edit Drop products_price_sorter
idx_master_categories_id_zen INDEX None Edit Drop master_categories_id
idx_products_sort_order_zen INDEX None Edit Drop products_sort_order
idx_manufacturers_id_zen INDEX None Edit Drop manufacturers_id
products_id INDEX None Edit Drop products_id

I am assuing I need to delete the first entry of:

PRIMARY PRIMARY 0 Edit Drop products_id

Is this correct?

Happy to be a Zen Cart Monthly Donor! :)

12 Mar 2012, 10:29 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: The following indexes appear to be equal and one of them should be removed warning

Do not delete the primary delete the other index ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

12 Mar 2012, 10:34 PM
#4
nadsab avatar

nadsab

Totally Zenned

Join Date:
Sep 2004
Posts:
496
Plugin Contributions:
0

Re: The following indexes appear to be equal and one of them should be removed warning

OK thanks....

I delete this one?

products_id INDEX None Edit Drop products_id

Happy to be a Zen Cart Monthly Donor! :)

12 Mar 2012, 10:42 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: The following indexes appear to be equal and one of them should be removed warning

That is the one I would get rid of ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

12 Mar 2012, 10:43 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: The following indexes appear to be equal and one of them should be removed warning

Be careful!!!!!!!

Don't go just deleting things willy-nilly.

Sometimes duplication is INTENTIONAL. (notwithstanding the example you cited is clearly needless duplication).

Any indexes named "idx_xxxxxxxxx_zen" are intentional indexes placed by Zen Cart (unless someone has modified them post-install). If you see duplication messages about those, ignore them.

NOTE: the PRIMARY will never have any idx_ prefix or _zen suffix.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

12 Mar 2012, 10:46 PM
#7
nadsab avatar

nadsab

Totally Zenned

Join Date:
Sep 2004
Posts:
496
Plugin Contributions:
0

Re: The following indexes appear to be equal and one of them should be removed warning

OK thanks to U 2...will take your advice,

I was not sure that's why i asked, because the warning message said to delete the > PRIMARY, products_id.

...and neither of the two have the idx prefix...

Happy to be a Zen Cart Monthly Donor! :)

12 Mar 2012, 11:27 PM
#8
nadsab avatar

nadsab

Totally Zenned

Join Date:
Sep 2004
Posts:
496
Plugin Contributions:
0

Re: The following indexes appear to be equal and one of them should be removed warning

Just curious while I'm on the subject.....how does one view an entire MySQL table in phpMyAdmin?

I'm not going to do any table editing - I plan on using easy populate to upload a store, just curious how to view an entire table like the products table.

All I have been able to figure out my first day on phpMyAdmin is view the fields (or column headings) of a table.

Happy to be a Zen Cart Monthly Donor! :)

13 Mar 2012, 3:19 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: The following indexes appear to be equal and one of them should be removed warning

Use the Browse tab.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.