Posts

Showing posts with the label sql query optimisation

AI Tools to help with SQL Queries

Image
 AI Tools to help with SQL Queries Learn all about it  AI2SQL ( ai2sql.io ): Easy web UI; paste your SQL and get suggestions.   Tabnine SQL Assistant (tabnine.com)  works in VSCode/JetBrains and gives autocomplete and improvement suggestions as you type SQL. I use this regularly—great for quick tips, but sometimes generic for really complex queries. ChatGPT ( chat.openai.com ): Paste your SQL and ask for improvements or explanations.  Databricks AI SQL (databricks-sql):  Databricks has AI SQL features directly in the platform.   SQL Flash (sqlflash.ai) —it uses AI to review your SQL and suggests optimisations or explains bottlenecks.  Learn all about it  Here is a comparison: Tool Accuracy Schema Aware Dialects Ease of Use Best For AI2SQL 90% Yes (direct connect) 10+ Easiest Non-technical users ChatGPT ...

Is Airtable A No-SQL Database?

  Is Airtable A No-SQL Database? Short answer: ·          From a user point of view, yes — Airtable behaves like a NoSQL system. ·          From a technical point of view, no — it’s not a pure NoSQL database. User / practical perspective ·          You don’t write SQL ( Do the SQL Course ) You don’t design schemas like in SQL databases You work with flexible records, links, and fields You query data via a REST API , not SQL Because of this, people often treat Airtable like a NoSQL database . Technical / internal perspective Airtable supports: Tables Relations (linked records) o     Structured fields Do the SQL Course This strongly suggests a relational (SQL-like) model under the hood , even though Airtable doesn’t expose SQL to users. So internally, it’s relational , not NoSQL. Do the SQL Cour...

Two Ways MySQL Workbench Can Draw an ERD

  Two Ways MySQL Workbench Can Draw an ERD Do the course A. Reverse Engineer (from an existing database) Menu: Database → Reverse Engineer Workbench connects to your DB, reads all schema metadata, and draws the ERD automatically. B. Create a Model Manually (forward engineer) Menu: File → New Model You create tables visually, and Workbench generates SQL from your ERD. Do the course NB! Make sure that all primary and foreign keys are identified, because the diagram will be drawn based of primary and foreign key definitions.   Do the course

How You Generate an ERD in SSMS ?

  How You Generate an ERD in SSMS (SSMS = SQL Server Management Studio)  Do the course Expand your database in SSMS. Right-click  Database Diagrams . Select  New Database Diagram . Choose the tables you want to include. SSMS automatically draws the ERD. Do the course

What is a Data Warehouse?

Image
  What is a Data Warehouse? Do the course Have you ever thought about where all the information generated across industries is kept? Every day, the world produces billions of megabytes of data, and that number continues to rise. In this lesson, we’ll explore how data warehouses store this information in a centralized location and allow organizations to use it effectively. Let’s dive straight in. What is a Data Warehouse? Do the course A Data Warehouse (DWH) is a key element of a business intelligence ecosystem, designed to help users carry out analytical tasks and examine large datasets. It brings together information from a variety of sources—including transactional systems, application logs, and more. A DWH often acts as the organization’s authoritative source of data. You can think of it as a dedicated environment that supports management by holding vast amounts of historical information. By evaluating this data, a DWH enables companies to make more informed and...

What is DB Browser

Image
What is DB Browser DB Browser for SQL ite (DB4S) is a free, open-source visual tool that helps users build, browse, and modify SQLite or SQLCipher database files. It offers a user-friendly, spreadsheet-style interface with full support for SQL queries. It is compatible with Windows, macOS, and major Linux and Unix systems. User guides and documentation are available on its wiki page. DB4S provides full access to all the features of the underlying SQL ite, including built-in controls and step-by-step wizards that allow users to: ·          Create new database files and reduce their size through compaction ·          Build, edit, remove, or redefine database tables ·          Set up, modify, or delete indexes ·          View, update, insert, and remove data records ·        ...

Here are 10 ideas to keep the size of a PostgreSQL data table small:

Here are 10 ideas to keep the size of a SQL data table small: Use Appropriate Data Types Choose the smallest SQL data type needed (e.g., INT instead of BIGINT , TEXT instead of VARCHAR(1000) if unbounded). Avoid Unused Columns Don’t include columns that aren’t needed or rarely used—split them into separate  SQL  tables if necessary. Normalize the Schema Use normalization to avoid redundant data storage (e.g., store repeated  SQL   strings as foreign keys). Use Partial Indexes Create indexes only on rows that need them instead of the entire  SQL    table. Drop Unused Indexes Indexes take up space—remove ones that aren’t used in  SQL   queries. Use NULL Instead of Defaults Store NULL for optional data instead of large default values. Compress Data Use  (postgres)  SQL  TOAST (automatic) or manual compression (e.g., with pg_compress ) for large text/blob fields. (MySQL :  DYNAMIC or COMPRESSE...