Change from primary (fiid, nid) to primary(nid), index(fiid), index (feed_nid) but also index(url) and index(guid) - as there are performance sensitive searches by those fields in 2 places in feedapi_node.module.

I also removed the auto-increment

Fiid is incremented correctly by db_next_id() now.

I am not sure wether we need fiid column at all.

Needs to be tested with PostgreSQL MySQL 5 and MySQL 4.1.

Comments

alex_b’s picture

StatusFileSize
new4.74 KB

Updated patch: remove feedapi_node_item_fiid entry in sequences table before inserting it. Avoids errors in case a user doesn't update right away.

On a general note, in regards to testing this patch:

I am particularly worried about

INSERT INTO {sequences} (name, id) VALUES ('feedapi_node_item_fiid', (SELECT MAX(fiid) FROM {feedapi_node_item}) )

as I don't know wether this query will work on PostgreSQL and MySQL < 5.

aron novak’s picture

Status: Needs review » Fixed

I extended it with postgtesql-equivalent statements. If there are any postgresql users, please test these new indeces against performance. I also created the table and tried out the update statements w/ Mysql 4.7. (Mysql 5 is already the default at my dev environment)

alex_b’s picture

rock on!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.