SQL Minify

Online SQL Minifier | Online SQL Compressor | Online SQL Analyzer


                                                        

What is SQL Minifier or SQL Compressor ?

SQL minifier or SQL compressor is a tool used to optimize SQL code to make your software / web application faster by decreasing the SQL file size. You can compress SQL code or file using our online SQL compressor tool. Minimizing SQL means removing any unnecessary characters from SQL to reduce its size and thereby speed up the software / web application load.


How SQL Minifier Works ?

Our SQL minifier tool removes whitespace, strips comments, combines files, optimizes, shortens common programming patterns and make your SQL smaller and faster.


What are the advantages of SQL Minification ?

  • SQL file become harder to read, since there are no white spaces, line breaks, delimiters etc.
  • Optimized version has a smaller size, which speeds up your software / web application.

SQL Minification Example

Before :

SELECT ca.proj_id AS proj_id,
         ca.ca_name AS proj_name,
         ca.ca_date_start AS proj_start,
         ca.ca_date_end AS proj_end,
        
    (SELECT COUNT(*)
    FROM rotations r
    WHERE r.proj_id = proj_id
            AND r.r_status = 'R'
    GROUP BY  r.proj_id) r_count, 
    (SELECT count(*)
    FROM rotations r
    WHERE r.proj_id = proj_id
            AND r.channel_id = 24 ) r_rtb_count
FROM projs ca, clients c, proj_auth caa
WHERE ca.client_id = 12345
        AND ca.client_id = c.client_id
        AND ca_type = 'zzz'
        AND c.agency_id = 0
        AND ca.client_id = NVL( caa.client_id, ca.client_id )
        AND proj_id = NVL( caa.proj_id, proj_id )
        AND caa.contact_id = 7890

After :

SELECT ca.proj_id AS proj_id, ca.ca_name AS proj_name, ca.ca_date_start AS proj_start, ca.ca_date_end AS proj_end,(SELECT COUNT(*) FROM rotations r WHERE r.proj_id = proj_id AND r.r_status = 'R' GROUP BY r.proj_id) r_count, (SELECT count(*) FROM rotations r WHERE r.proj_id = proj_id AND r.channel_id = 24 ) r_rtb_count FROM projs ca, clients c, proj_auth caa WHERE ca.client_id = 12345 AND ca.client_id = c.client_id AND ca_type = 'zzz' AND c.agency_id = 0 AND ca.client_id = NVL( caa.client_id, ca.client_id ) AND proj_id = NVL( caa.proj_id, proj_id ) AND caa.contact_id = 7890