<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2017-05-02</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0000897723</issuerCik>
        <issuerName>SANMINA CORP</issuerName>
        <issuerTradingSymbol>SANM</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001192521</rptOwnerCik>
            <rptOwnerName>EULAU ROBERT K</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>2700 NORTH FIRST STREET</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>SAN JOSE</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>95134</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>Executive VP, CFO</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2017-05-02</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>10000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>37.1045</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>220000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">THE SALE PRICE REPORTED IN COLUMN 4 OF TABLE 1 REPRESENTS THE WEIGHTED AVERAGE SALE PRICE OF SHARES SOLD RANGING FROM $36.85 TO $37.75 PER SHARE. UPON REQUEST BY THE COMMISSION STAFF, THE ISSUER, OR SECURITY HOLDER OF THE ISSUER, THE REPORTING PERSON WILL PROVIDE FULL INFORMATION REGARDING THE NUMBER OF SHARES SOLD AT EACH SEPARATE PRICE.</footnote>
    </footnotes>

    <remarks>All sales reported herein were made pursuant to a pre-existing Rule 10b5-1 trading plan.</remarks>

    <ownerSignature>
        <signatureName>/s/ Christopher K. Sadeghian, Attorney-in-Fact</signatureName>
        <signatureDate>2017-05-04</signatureDate>
    </ownerSignature>
</ownershipDocument>
