{"id":122,"date":"2026-07-17T12:45:43","date_gmt":"2026-07-17T10:45:43","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/?p=122"},"modified":"2026-10-24T00:57:44","modified_gmt":"2026-10-23T22:57:44","slug":"extracting-specific-tables-from-massive-sql-dumps-using-php","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/","title":{"rendered":"Extracting Specific Tables from Massive SQL Dumps using PHP"},"content":{"rendered":"<p>A large MySQL dump may contain only one table that needs further work. Extracting relevant text does not require loading the entire file into an editor or PHP memory. The important distinction is the intended result: a text excerpt for inspection or a database backup that can actually be restored.<\/p>\n<p>A line-based filter is not an SQL parser. The PHP example below copies selected table sections identified by standard comments. Its output remains a <strong>text excerpt for review<\/strong>. A targeted fresh export or a validated restore workflow is preferable when recoverability is the goal.<\/p>\n<figure class=\"lw-diagram wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/dia-122-sql-20261024-en.png\" width=\"1120\" height=\"580\" alt=\"SQL excerpts: separate database and table selection\" loading=\"lazy\" \/><\/figure>\n<h2>Why one on\/off flag is insufficient<\/h2>\n<p>Database and table are separate states. A database change ends the current selection. Every new table marker requires another selection decision. Checking table markers only while copying is disabled would continue copying unrelated tables after the first match.<\/p>\n<p><code>fgets()<\/code> alone does not guarantee tiny memory usage. Without a length limit, it reads a whole line, and an extended <code>INSERT<\/code> can be large. This example reads at most 65,536 bytes per step and examines markers only at the start of a line. Long data lines are copied in chunks.<\/p>\n<h2>Required dump format<\/h2>\n<ul>\n<li>An uncompressed text file using the usual <code>mysqldump<\/code> comment format with database markers, such as an export made with <code>--databases<\/code> or <code>--all-databases<\/code>.<\/li>\n<li>The file contains <code>-- Current Database:<\/code> and the relevant <code>-- Table structure for table<\/code> and\/or <code>-- Dumping data for table<\/code> markers. Dumps made with <code>--skip-comments<\/code> are not supported by this method.<\/li>\n<li>Exact database and table names, rather than one ambiguous shared prefix. Embedded backticks in identifiers and different generator formats are outside its scope.<\/li>\n<li>PHP 8 CLI and a local filesystem supporting hard links within one directory. Input, partial output, and final output belong outside publicly accessible web directories.<\/li>\n<\/ul>\n<p>Compressed dumps first need decompression into a protected workspace with sufficient storage. Inspecting the file header helps identify the format, but does not establish the complete contents, every later table, or all line lengths.<\/p>\n<h2>PHP example: explicitly named table sections<\/h2>\n<p><code>php extract.php dump.sql excerpt.txt shop orders customers<\/code> selects <code>orders<\/code> and <code>customers<\/code> from database <code>shop<\/code>. Neither the output file nor its <code>.part<\/code> file may already exist.<\/p>\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/\/ PHP 8 CLI. Produces a text excerpt, not a validated restore file.\numask(0077);\nif ($argc &lt; 5) {\n    fwrite(STDERR, &quot;Usage: php extract.php input.sql excerpt.txt database table [table...]\\n&quot;);\n    exit(2);\n}\n[, $input, $output, $database] = $argv;\n$tables = array_fill_keys(array_slice($argv, 4), true);\n$part = $output . &#x27;.part&#x27;;\n$in = $out = false;\n$created = false;\n\ntry {\n    $in = @fopen($input, &#x27;rb&#x27;);\n    if ($in === false) throw new RuntimeException(&#x27;Cannot open input&#x27;);\n    $out = @fopen($part, &#x27;xb&#x27;);\n    if ($out === false) throw new RuntimeException(&#x27;Cannot create new partial output&#x27;);\n    $created = true;\n    $currentDatabase = null;\n    $copy = false;\n    $lineStart = true;\n    $seen = [];\n\n    while (($chunk = fgets($in, 65537)) !== false) {\n        if ($lineStart) {\n            if (preg_match(&#x27;\/^-- Current Database: `([^`]+)`\\r?\\n?$\/D&#x27;, $chunk, $m)) {\n                $currentDatabase = $m[1];\n                $copy = false;\n            } elseif (preg_match(&#x27;\/^-- (?:Table structure|Dumping data) for table `([^`]+)`\\r?\\n?$\/D&#x27;, $chunk, $m)) {\n                $copy = $currentDatabase === $database &amp;&amp; isset($tables[$m[1]]);\n                if ($copy) $seen[$m[1]] = true;\n            } elseif (str_starts_with($chunk, &#x27;-- &#x27;)) {\n                $copy = false;\n            }\n        }\n        if ($copy) {\n            $offset = 0;\n            $length = strlen($chunk);\n            while ($offset &lt; $length) {\n                $n = fwrite($out, substr($chunk, $offset));\n                if ($n === false || $n === 0) throw new RuntimeException(&#x27;Write failed&#x27;);\n                $offset += $n;\n            }\n        }\n        $lineStart = str_ends_with($chunk, &quot;\\n&quot;);\n    }\n    if (!feof($in)) throw new RuntimeException(&#x27;Read failed&#x27;);\n    if (array_diff_key($tables, $seen)) {\n        throw new RuntimeException(&#x27;Requested table marker missing; format or names differ&#x27;);\n    }\n    if (!fflush($out)) throw new RuntimeException(&#x27;Flush failed&#x27;);\n    if (!fclose($out)) throw new RuntimeException(&#x27;Close failed&#x27;);\n    $out = false;\n    \/\/ Same-directory hard link: fails if the final name already exists.\n    if (!@link($part, $output)) throw new RuntimeException(&#x27;Cannot publish new output&#x27;);\n    if (!unlink($part)) throw new RuntimeException(&#x27;Output exists, partial link cleanup failed&#x27;);\n    $created = false;\n    fwrite(STDERR, &quot;Text excerpt written. Separate restore validation required.\\n&quot;);\n} catch (Throwable $e) {\n    if (is_resource($out)) fclose($out);\n    if ($created &amp;&amp; is_file($part)) unlink($part);\n    fwrite(STDERR, $e-&gt;getMessage() . &quot;\\n&quot;);\n    exit(1);\n} finally {\n    if (is_resource($in)) fclose($in);\n}\n<\/code><\/pre>\n<p>The final output appears only after the input has been read, writes have succeeded, and at least one matching marker has been found for each requested table. A marker proves section selection, not complete SQL objects. An existing result is not overwritten. Errors produce a nonzero exit status rather than reporting a partial excerpt as a finished result.<\/p>\n<h2>From an excerpt to a restore<\/h2>\n<p>Session settings such as character set and SQL mode, foreign-key dependencies, triggers, views, and routines may sit outside the copied sections. Unusually formatted SQL strings can also contain comment-like text. This example does not interpret those SQL structures and is not a universal import filter.<\/p>\n<p>When the original server remains available, <code>mysqldump<\/code> accepts a database followed by explicitly selected table names. For InnoDB, <code>--single-transaction<\/code> can provide a consistent backup; other storage engines and concurrent schema changes require an appropriate strategy. When only a dump remains, an isolated restore followed by targeted object export offers a more controlled route. Target version, storage, dependencies, and permissions need checking before import.<\/p>\n<div class=\"lw-faq\">\n<h2>Questions and answers<\/h2>\n<h3>How fast is the filter?<\/h3>\n<p>The entire input file is read. Runtime and memory use depend on storage, output volume, PHP, and other factors. A blanket promise of several gigabytes in seconds is not reliable. The bounded read buffer simply avoids holding an entire unusually long line in PHP memory.<\/p>\n<h3>What does a missing match mean?<\/h3>\n<p>A name may be absent, spelled differently, or present without the expected comments. The script reports an error in that case. An empty excerpt is not presented as evidence of an empty table.<\/p>\n<h3>Does success prove that every selected object can be restored?<\/h3>\n<p>No. A restore test with schema, row, and dependency checks is a separate step. The original dump remains unchanged.<\/p>\n<\/div>\n<h2>Sources and review date<\/h2>\n<p>2026-10-24<\/p>\n<ul>\n<li><a href=\"https:\/\/www.php.net\/manual\/en\/function.fgets.php\">PHP: fgets<\/a><\/li>\n<li><a href=\"https:\/\/www.php.net\/manual\/en\/function.fwrite.php\">PHP: fwrite<\/a><\/li>\n<li><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/mysqldump.html\">MySQL 8.4: mysqldump<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A large MySQL dump may contain only one table that needs further work. Extracting relevant text does not require loading the entire file into an editor or PHP memory. The important distinction is the intended result: a text excerpt for inspection or a database backup that can actually be restored. A line-based filter is not [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":13647,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[91106,91225,91104,91093,91099],"class_list":["post-122","post","type-post","status-publish","format-standard","hentry","category-it-networks","tag-automation","tag-backup","tag-mysql","tag-php","tag-server-administration"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Extracting Specific Tables from Massive SQL Dumps using PHP | Lukas Wojcik<\/title>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Extracting Specific Tables from Massive SQL Dumps using PHP | Lukas Wojcik\" \/>\n<meta property=\"og:description\" content=\"A large MySQL dump may contain only one table that needs further work. Extracting relevant text does not require loading the entire file into an editor or PHP memory. The important distinction is the intended result: a text excerpt for inspection or a database backup that can actually be restored. A line-based filter is not [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-17T10:45:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-23T22:57:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-122-extracting-specific-tables-from-mass-g.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Extracting Specific Tables from Massive SQL Dumps using PHP\",\"datePublished\":\"2026-07-17T10:45:43+00:00\",\"dateModified\":\"2026-10-23T22:57:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/\"},\"wordCount\":639,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-122-extracting-specific-tables-from-mass-g.png\",\"keywords\":[\"Automation\",\"Backup\",\"MySQL\",\"PHP\",\"Server Administration\"],\"articleSection\":[\"IT &amp; Networks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/\",\"name\":\"Extracting Specific Tables from Massive SQL Dumps using PHP | Lukas Wojcik\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-122-extracting-specific-tables-from-mass-g.png\",\"datePublished\":\"2026-07-17T10:45:43+00:00\",\"dateModified\":\"2026-10-23T22:57:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-122-extracting-specific-tables-from-mass-g.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-122-extracting-specific-tables-from-mass-g.png\",\"width\":1200,\"height\":630,\"caption\":\"Extracting Specific Tables from Massive SQL Dumps using PHP\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/it-networks\\\/extracting-specific-tables-from-massive-sql-dumps-using-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extracting Specific Tables from Massive SQL Dumps using PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"Lukas Wojcik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"Lukas Wojcik\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Extracting Specific Tables from Massive SQL Dumps using PHP | Lukas Wojcik","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"Extracting Specific Tables from Massive SQL Dumps using PHP | Lukas Wojcik","og_description":"A large MySQL dump may contain only one table that needs further work. Extracting relevant text does not require loading the entire file into an editor or PHP memory. The important distinction is the intended result: a text excerpt for inspection or a database backup that can actually be restored. A line-based filter is not [&hellip;]","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-07-17T10:45:43+00:00","article_modified_time":"2026-10-23T22:57:44+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-122-extracting-specific-tables-from-mass-g.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Extracting Specific Tables from Massive SQL Dumps using PHP","datePublished":"2026-07-17T10:45:43+00:00","dateModified":"2026-10-23T22:57:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/"},"wordCount":639,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-122-extracting-specific-tables-from-mass-g.png","keywords":["Automation","Backup","MySQL","PHP","Server Administration"],"articleSection":["IT &amp; Networks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/","name":"Extracting Specific Tables from Massive SQL Dumps using PHP | Lukas Wojcik","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-122-extracting-specific-tables-from-mass-g.png","datePublished":"2026-07-17T10:45:43+00:00","dateModified":"2026-10-23T22:57:44+00:00","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-122-extracting-specific-tables-from-mass-g.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-122-extracting-specific-tables-from-mass-g.png","width":1200,"height":630,"caption":"Extracting Specific Tables from Massive SQL Dumps using PHP"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/it-networks\/extracting-specific-tables-from-massive-sql-dumps-using-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Extracting Specific Tables from Massive SQL Dumps using PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"Lukas Wojcik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"Lukas Wojcik"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=122"}],"version-history":[{"count":7,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/122\/revisions"}],"predecessor-version":[{"id":22886,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/122\/revisions\/22886"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/13647"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}