sed command to delete a pattern in a file

Hi Everyone,
I have an unusual requirement. Here is where i am stuck for sometime now...

I have this text file.. lets say .. output.sql...

it has lot of entries... here below is part of the entry...

.. . . . . . . . . . . . . . . . . .,('garbage','DirectoryTreePointOfContactRelation','tePointOfContactId','2014-05-26 10:00:29','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('garbage','DirectoryTreePointOfContactRelation','tePointOfContactId','2014-05-26 10:00:29','size',1,NULL,'Number of pages in the index'),('garbage','garbageLocation','FK_garbageLocation_parentMyId','2014-06-0410:20:19','n_diff_pfx01',3,1,'parentInstanceId'),('garbage','garbageLocation','FK_garbageLocation_parentMyId','2014-06-04 10:20:19','n_diff_pfx01',3,1,'parentInstanceId'),('garbage','garbageLocation','FK_garbageLocation_parentMyId','2014-06-04 10:20:19','n_diff_pfx 02',6,1,'parentInstanceId,id'),('garbage','garbageLocation','FK_garbageLocation_parentMyId','2014-06-04 10:20:19','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),  .. .. . . .. . .. . .. . . .. . .. 

from some error message, i would get below details:

[root@mysqlbackup]# cat EnterpriseBackupConsoleMessages.txt | grep PRIMARY  | awk -F'-' '{print $1}' | awk -F\' '{print $2}'
garbage
[root@mysqlbackup]#
[root@mysqlbackup]#cat EnterpriseBackupConsoleMessages.txt | grep PRIMARY  | awk -F'-' '{print $2}'
garbageLocation
[root@mysqlbackup]#cat EnterpriseBackupConsoleMessages.txt | grep PRIMARY  | awk -F'-' '{print $3}'
FK_garbageLocation_parentMyId
[root@mysqlbackup]#cat EnterpriseBackupConsoleMessages.txt | grep PRIMARY  | awk -F'-' '{print $4}' | awk -F\' '{print $1}'
n_diff_pfx01
[root@mysqlbackup]#

So i will store these fields in variables as below:

firstWord=garbage
secondWord=garbageLocation
thirdWord=FK_garbageLocation_parentMyId
fourthWord=n_diff_pfx01

these variable has the same contents as highlighted in red in the text file.Now what i want to achieve is, delete the first occurrence of this matching pattern.

That is delete the first occurence pattern starting from '(' till '),'

i mean to delete the entry

('garbage','garbageLocation','FK_garbageLocation_parentMyId','2014-06-0410:20:19','n_diff_pfx01',3,1,'parentInstanceId'),

I need a sed -i command so that it removes this first occurence, and efficiently fast (the max file size is 5MB) such that final output will be as below,

.. . . . . . . . . . . . . . . . . .,('garbage','DirectoryTreePointOfContactRelation','tePointOfContactId','2014-05-26 10:00:29','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),('garbage','DirectoryTreePointOfContactRelation','tePointOfContactId','2014-05-26 10:00:29','size',1,NULL,'Number of pages in the index'),('garbage','garbageLocation','FK_garbageLocation_parentMyId','2014-06-04 10:20:19','n_diff_pfx01',3,1,'parentInstanceId'),('garbage','garbageLocation','FK_garbageLocation_parentMyId','2014-06-04 10:20:19','n_diff_pfx 02',6,1,'parentInstanceId,id'),('garbage','garbageLocation','FK_garbageLocation_parentMyId','2014-06-04 10:20:19','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),  .. .. . . .. . .. . .. . . .. . .. 

any help or guidance on how to achieve this is deeply appreciated.

That doesn't tell the criteria.
Do you want to delete the text between the parenthesis (including parenthesis) if :

('word1','word2','word3','anything','word4', whatever)

matches?

it should delete with parenthesis and a comma at the end. Basically this whole below content must be deleted from that file.

('word1','word2','word3','anything','word4', whatever),
awk -vw1="${firstWord}" -vw2="${secondWord}" -vw3="${thirdWord}" -vw4="${fourthWord}" -vq="'" -F "[(]|[)],[(]|[)]" '
  {for(i = 1; i <=NF; i++)
    {split($i, a, ",");
    if(a[1] == q w1 q && a[2] == q w2 q && a[3] == q w3 q && a[5] == q w4 q)
      {sub("[(]" $i "),?", X); break}}}1' file