[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"me":3,"catalog:en:database\u002Fquery-optimization":4,"config":214},null,{"field_key":5,"field_name":6,"seniority":7,"topic_key":8,"topic_name":9,"spec_key":7,"spec_name":7,"locale":10,"cell_total":11,"field_total":12,"seniorities":13,"topics":17,"specs":115,"samples":129},"database","Database","","query-optimization","Query Optimization","en",75,2475,[14,15,16],"junior","mid","senior",[18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,87,88,91,94,97,100,103,106,109,112],{"key":19,"name":20,"count":11},"backup-recovery","Backup Recovery",{"key":22,"name":23,"count":11},"data-modeling","Data Modeling",{"key":25,"name":26,"count":11},"indexing","Indexing",{"key":28,"name":29,"count":11},"mongodb-aggregation","Mongodb Aggregation",{"key":31,"name":32,"count":11},"mongodb-indexes-queries","Mongodb Indexes Queries",{"key":34,"name":35,"count":11},"mongodb-operations","Mongodb Operations",{"key":37,"name":38,"count":11},"mongodb-replication-sharding","Mongodb Replication Sharding",{"key":40,"name":41,"count":11},"mongodb-schema-modeling","Mongodb Schema Modeling",{"key":43,"name":44,"count":11},"mongodb-transactions-consistency","Mongodb Transactions Consistency",{"key":46,"name":47,"count":11},"mysql-indexes","Mysql Indexes",{"key":49,"name":50,"count":11},"mysql-innodb-transactions","Mysql Innodb Transactions",{"key":52,"name":53,"count":11},"mysql-operations","Mysql Operations",{"key":55,"name":56,"count":11},"mysql-query-optimization","Mysql Query Optimization",{"key":58,"name":59,"count":11},"mysql-replication-scaling","Mysql Replication Scaling",{"key":61,"name":62,"count":11},"mysql-types-constraints","Mysql Types Constraints",{"key":64,"name":65,"count":11},"nosql-models","Nosql Models",{"key":67,"name":68,"count":11},"performance-tuning","Performance Tuning",{"key":70,"name":71,"count":11},"pg-indexes","Pg Indexes",{"key":73,"name":74,"count":11},"pg-mvcc-vacuum","Pg Mvcc Vacuum",{"key":76,"name":77,"count":11},"pg-operations","Pg Operations",{"key":79,"name":80,"count":11},"pg-query-planning","Pg Query Planning",{"key":82,"name":83,"count":11},"pg-transactions-locking","Pg Transactions Locking",{"key":85,"name":86,"count":11},"pg-types-constraints","Pg Types Constraints",{"key":8,"name":9,"count":11},{"key":89,"name":90,"count":11},"redis-cluster-sharding","Redis Cluster Sharding",{"key":92,"name":93,"count":11},"redis-data-structures","Redis Data Structures",{"key":95,"name":96,"count":11},"redis-expiration-eviction","Redis Expiration Eviction",{"key":98,"name":99,"count":11},"redis-persistence","Redis Persistence",{"key":101,"name":102,"count":11},"redis-replication-sentinel","Redis Replication Sentinel",{"key":104,"name":105,"count":11},"redis-transactions-scripting","Redis Transactions Scripting",{"key":107,"name":108,"count":11},"replication-scaling","Replication Scaling",{"key":110,"name":111,"count":11},"security-access","Security Access",{"key":113,"name":114,"count":11},"transactions-isolation","Transactions Isolation",[116,120,123,126],{"key":117,"name":118,"count":119},"mongodb","MongoDB",450,{"key":121,"name":122,"count":119},"mysql","MySQL",{"key":124,"name":125,"count":119},"postgresql","PostgreSQL",{"key":127,"name":128,"count":119},"redis","Redis",[130,148,161,175,188,201],{"id":131,"topic":9,"difficulty":132,"body":133,"options":134,"correct_key":142,"explanation":147},"019f56bb-b6a4-7ad9-9619-4d604e04fef5",1,"What does the SQL `EXPLAIN` command primarily show for a query?",[135,138,141,144],{"key":136,"text":137},"a","The rows the query will return, without actually running it against the data",{"key":139,"text":140},"b","A list of every index defined on the tables referenced by the query",{"key":142,"text":143},"c","The execution plan the optimizer chose, such as scan and join methods",{"key":145,"text":146},"d","The exact wall-clock time the query took the last time it ran","EXPLAIN reports the planner's chosen execution plan — which scans (sequential vs index), join methods, and order it intends to use, along with cost and row estimates — without returning the actual rows (a). It does not list all indexes (b); it shows only the ones the plan uses. Plain EXPLAIN estimates and does not execute, so it reports no real timing (d) — that requires EXPLAIN ANALYZE.",{"id":149,"topic":9,"difficulty":132,"body":150,"options":151,"correct_key":136,"explanation":160},"019f56bb-b6a5-7780-92d3-6d94003d7c9c","In a query execution plan, what does an *index scan* mean?",[152,154,156,158],{"key":136,"text":153},"The engine walks an index to locate matching rows instead of reading the whole table",{"key":139,"text":155},"The engine loads the entire table into memory and then searches through it one row at a time",{"key":142,"text":157},"The engine rebuilds the index before answering the query",{"key":145,"text":159},"The engine returns rows in random physical order to save time","An index scan uses the index structure (typically a B-tree) to jump to the matching rows, avoiding a full read of the table. Rebuilding the index (c) is a maintenance operation, not part of answering a query. Loading the whole table and scanning it (b) describes a sequential scan, the opposite approach.",{"id":162,"topic":9,"difficulty":163,"body":164,"options":165,"correct_key":145,"explanation":174},"019f56bb-b6a6-70ba-a331-85fa98146619",2,"For which case is a sequential (full table) scan often a *better* plan than an index scan?",[166,168,170,172],{"key":136,"text":167},"Looking up a single row by its primary key in an extremely large table",{"key":139,"text":169},"Fetching one user by a unique, highly selective email column",{"key":142,"text":171},"A large table where the filter column has a dedicated index",{"key":145,"text":173},"A small table, or a query that returns a large fraction of the rows","Index scans win when a query touches a small, selective slice of a big table. When the table is tiny or the query returns most of the rows, reading everything sequentially is cheaper than jumping back and forth between index and table for nearly every row. Single-row primary-key or selective-email lookups (a, b) are the classic cases where an index scan is clearly better.",{"id":176,"topic":9,"difficulty":132,"body":177,"options":178,"correct_key":139,"explanation":187},"019f56bb-b6a6-786c-9b41-8b741bcef5d6","Why is `SELECT *` generally discouraged in performance-sensitive queries?",[179,181,183,185],{"key":136,"text":180},"It always returns the rows in the wrong order",{"key":139,"text":182},"It fetches every column, adding I\u002FO and network cost and blocking index-only plans",{"key":142,"text":184},"It silently drops rows that contain any NULL value",{"key":145,"text":186},"It holds an exclusive lock on the whole table until the client finishes reading every result row","`SELECT *` pulls all columns even when only a few are needed, wasting I\u002FO and network bandwidth and preventing index-only scans (where the index alone can satisfy the query). It does not change row order (a), drop NULL-containing rows (c), or lock the table (d).",{"id":189,"topic":9,"difficulty":163,"body":190,"options":191,"correct_key":136,"explanation":200},"019f56bb-b6a7-706e-9b6f-33410398f70a","`orders.created_at` has a B-tree index, but this query does a full scan anyway:\n```sql\nSELECT * FROM orders\nWHERE EXTRACT(YEAR FROM created_at) = 2024;\n```\nWhy, and what is the standard fix?",[192,194,196,198],{"key":136,"text":193},"Wrapping the column in a function hides it from the index; rewrite it as a range on created_at",{"key":139,"text":195},"The index is corrupted and must be rebuilt before the query can use it",{"key":142,"text":197},"EXTRACT is not permitted inside a WHERE clause, so the planner silently ignores the whole index",{"key":145,"text":199},"B-tree indexes never support date columns; a hash index is required here","An index on `created_at` stores raw column values, not `EXTRACT(YEAR FROM created_at)`. Once the column is inside a function, the engine can't match it against the index and falls back to a scan. Rewrite it as a sargable range: `created_at >= '2024-01-01' AND created_at \u003C '2025-01-01'`. The index is not corrupted (b), EXTRACT is valid in WHERE (c), and B-trees handle date columns fine (d).",{"id":202,"topic":9,"difficulty":163,"body":203,"options":204,"correct_key":142,"explanation":213},"019f56bb-b6a7-797c-88d2-71912af4d575","`customers.name` has a B-tree index. Two queries:\n```sql\n-- Q1\nSELECT * FROM customers WHERE name LIKE 'Ali%';\n-- Q2\nSELECT * FROM customers WHERE name LIKE '%Ali';\n```\nWhich can use the index, and why?",[205,207,209,211],{"key":136,"text":206},"Both can, because both use the LIKE operator on an indexed column",{"key":139,"text":208},"Neither can, because LIKE always forces a full table scan",{"key":142,"text":210},"Only Q1: a known prefix lets the engine seek within the ordered index",{"key":145,"text":212},"Only Q2: matching the end of a string is what B-trees are optimized for","A B-tree stores names in sorted order, so a fixed prefix ('Ali%') lets the engine seek straight to that range. A leading wildcard ('%Ali') has no known starting point, so the engine must examine every row — the index can't help. LIKE is not inherently a full scan (b); it depends on whether the pattern is anchored at the start.",{"fields":215,"seniorities":391,"interview_shapes":392,"locales":397,"oauth":399,"question_count":402,"coach_enabled":403,"jd_match_enabled":403},[216,241,261,278,302,315,324,343,365,372,378,385],{"key":217,"name_tr":218,"name_en":218,"sort":132,"specializations":219},"backend","Backend",[220,223,226,229,232,235,238],{"key":221,"name":222,"field":217},"general","Genel",{"key":224,"name":225,"field":217},"go","Go",{"key":227,"name":228,"field":217},"python","Python",{"key":230,"name":231,"field":217},"java","Java",{"key":233,"name":234,"field":217},"csharp","C#\u002F.NET",{"key":236,"name":237,"field":217},"nodejs","Node.js",{"key":239,"name":240,"field":217},"php","PHP",{"key":242,"name_tr":243,"name_en":243,"sort":163,"specializations":244},"frontend","Frontend",[245,246,249,252,255,258],{"key":221,"name":222,"field":242},{"key":247,"name":248,"field":242},"javascript","JavaScript",{"key":250,"name":251,"field":242},"typescript","TypeScript",{"key":253,"name":254,"field":242},"react","React",{"key":256,"name":257,"field":242},"vue","Vue",{"key":259,"name":260,"field":242},"angular","Angular",{"key":262,"name_tr":263,"name_en":263,"sort":264,"specializations":265},"fullstack","Fullstack",3,[266,267,268,269,270,271,272,273,274,275,276,277],{"key":221,"name":222,"field":262},{"key":224,"name":225,"field":217},{"key":227,"name":228,"field":217},{"key":230,"name":231,"field":217},{"key":233,"name":234,"field":217},{"key":236,"name":237,"field":217},{"key":239,"name":240,"field":217},{"key":247,"name":248,"field":242},{"key":250,"name":251,"field":242},{"key":253,"name":254,"field":242},{"key":256,"name":257,"field":242},{"key":259,"name":260,"field":242},{"key":279,"name_tr":280,"name_en":280,"sort":281,"specializations":282},"devops-cloud","DevOps \u002F Cloud",4,[283,284,287,290,293,296,299],{"key":221,"name":222,"field":279},{"key":285,"name":286,"field":279},"aws","AWS",{"key":288,"name":289,"field":279},"gcp","GCP",{"key":291,"name":292,"field":279},"azure","Azure",{"key":294,"name":295,"field":279},"kubernetes","Kubernetes",{"key":297,"name":298,"field":279},"terraform","Terraform",{"key":300,"name":301,"field":279},"linux","Linux",{"key":303,"name_tr":304,"name_en":304,"sort":305,"specializations":306},"ai-engineer","AI Engineer",5,[307,308,309,312],{"key":221,"name":222,"field":303},{"key":227,"name":228,"field":303},{"key":310,"name":311,"field":303},"llm-rag","LLM\u002FRAG",{"key":313,"name":314,"field":303},"mlops","MLOps",{"key":5,"name_tr":316,"name_en":6,"sort":317,"specializations":318},"Veritabanı",6,[319,320,321,322,323],{"key":221,"name":222,"field":5},{"key":124,"name":125,"field":5},{"key":121,"name":122,"field":5},{"key":117,"name":118,"field":5},{"key":127,"name":128,"field":5},{"key":325,"name_tr":326,"name_en":327,"sort":328,"specializations":329},"mobile","Mobil","Mobile",7,[330,331,334,337,340],{"key":221,"name":222,"field":325},{"key":332,"name":333,"field":325},"ios-swift","iOS (Swift)",{"key":335,"name":336,"field":325},"android-kotlin","Android (Kotlin)",{"key":338,"name":339,"field":325},"flutter","Flutter",{"key":341,"name":342,"field":325},"react-native","React Native",{"key":344,"name_tr":345,"name_en":346,"sort":347,"specializations":348},"security","Güvenlik","Security",8,[349,350,353,356,359,362],{"key":221,"name":222,"field":344},{"key":351,"name":352,"field":344},"appsec","AppSec",{"key":354,"name":355,"field":344},"offensive-pentest","Offensive \u002F Pentest",{"key":357,"name":358,"field":344},"cloud-security","Cloud Security",{"key":360,"name":361,"field":344},"devsecops","DevSecOps",{"key":363,"name":364,"field":344},"blue-team-incident","Blue Team \u002F Incident",{"key":366,"name_tr":367,"name_en":368,"sort":369,"specializations":370},"qa-test-automation","QA \u002F Test Otomasyonu","QA \u002F Test Automation",9,[371],{"key":221,"name":222,"field":366},{"key":373,"name_tr":374,"name_en":374,"sort":375,"specializations":376},"data-engineer","Data Engineer",10,[377],{"key":221,"name":222,"field":373},{"key":379,"name_tr":380,"name_en":381,"sort":382,"specializations":383},"game-dev","Oyun Geliştirme","Game Development",11,[384],{"key":221,"name":222,"field":379},{"key":386,"name_tr":387,"name_en":387,"sort":388,"specializations":389},"ml-engineer","ML Engineer",12,[390],{"key":221,"name":222,"field":386},[14,15,16],{"junior":393,"mid":395,"senior":396},{"questions":394,"median_sec":3},20,{"questions":394,"median_sec":3},{"questions":394,"median_sec":3},[398,10],"tr",[400,401],"google","github",21750,true]