← Back to All Tutors

Tutor Profile

Priya Sharma

MS Computer Science from BITS Pilani. Specializes in PostgreSQL query optimization and SQL window functions and CTEs.

Priya Sharma profile card with credential MS Computer Science and 750+ assignments delivered
750+ Assignments Delivered Across CSHH and prior tutoring
7 Years Tutoring Since first paid teaching role
3 Languages Covered JavaScript, Python, Java
8 Documented Specialties Each with a diagnostic playbook

About the Tutor

About Priya

Priya did her CS masters at BITS Pilani with a thesis on query optimization in PostgreSQL. Before that she shipped production web applications for five years across a Django backend, a Node.js services layer, and a React frontend that together moved real user traffic. The combination matters for tutoring. Most web-and-database assignments fail because the student understands one tier and treats the others as opaque; she works comfortably across all three and shows students the seams. 750+ CSHH assignments later, her sessions still feel like a code walkthrough from a senior teammate rather than a lecture.

Her favorite class of bug is the slow query. A student arrives with a Django view that returns the right data but takes 8 seconds. Priya opens the Django Debug Toolbar, sees 47 SQL queries fired for a single page render, and walks the student through the N+1 pattern that select_related and prefetch_related were designed to solve. The fix is usually three character changes. The lesson, that the ORM is hiding work the database actually has to do, takes longer and is the part students remember. Specific case from this semester: a CS186 project where a 14-table join was rewritten as a materialized view, dropping page render from 12 seconds to 200ms. The student kept the EXPLAIN ANALYZE output as a reference for their final.

On the JavaScript side her teaching priority is the event loop. Async control flow breaks more student code than any other single mechanism, and most curricula introduce promises and async/await without grounding either in the underlying queue model. Priya draws the call stack, the microtask queue, and the macrotask queue on the same page. Then she walks through a setTimeout(0) versus a Promise.resolve().then() example and asks the student to predict the print order. Students who get this right once usually do not write another race condition they cannot reason about. The diagram is on the whiteboard for the rest of the session.

A representative database optimization she documented for a returning student. The query was a customer-orders join in PostgreSQL filtering by date range, used to power a billing dashboard. The original plan did a sequential scan on a 4M-row orders table because the date column was wrapped in a function call inside the WHERE clause (date_trunc(order_date) BETWEEN ...), which defeated the existing btree index. The fix was to rewrite the predicate as order_date >= start AND order_date < end, which the planner could use the index for. Query time went from 4.2 seconds to 12 milliseconds. The student took the EXPLAIN ANALYZE comparison to their database course office hours and got a better grade on the final by re-explaining it.

React assignments are where students get the most surprises. The component renders, but it renders four times instead of once. Or it stops re-rendering when the parent state updates. Priya walks through the reconciler model on paper before opening the editor. Component identity, the rules of hooks, the dependency arrays that useEffect actually compares. She has a saved diagram of a setState batch and the resulting render cycle that she shares at the start of every React session; students who internalize the diagram stop fighting the framework.

Her CSHH workflow starts with the data, not the code. Whatever the brief, she pulls the schema first, runs the relevant queries by hand in psql or sqlite3 to confirm shape and cardinality, then builds the application layer on top of a verified data path. For React assignments she does the same with the component tree: sketch the prop flow on paper, identify which state lives where, then implement. A "good" student question for Priya is one that includes the schema, the failing query, and the EXPLAIN output. With those three things she can usually answer in a paragraph; without them, the first session is data archaeology.

Documented Specialties

What Priya Specializes In

PostgreSQL query optimization

EXPLAIN ANALYZE, index strategy, materialized views.

SQL window functions and CTEs

Priya handles sql window functions and ctes as a recurring CSHH workload, with documented patterns and reference solutions.

Django ORM

N+1 fixes, select_related, prefetch_related, raw SQL escape hatch.

Node.js async patterns

Event loop, microtask queue, error propagation.

React hooks and component composition

Priya handles react hooks and component composition as a recurring CSHH workload, with documented patterns and reference solutions.

TypeScript generics and discriminated unions

Priya handles typescript generics and discriminated unions as a recurring CSHH workload, with documented patterns and reference solutions.

Sample Reviewed Code

Code Priya Has Reviewed

A representative snippet from Priya's workflow. Pulled from the diagnostic playbook Priya runs on incoming CSHH assignments in this language.

SQL sargable_predicate.sql

          
          -- BEFORE: function wraps the indexed column, planner cannot use idx_order_date.
        
          
          -- Seq Scan on orders (cost=0.00..104329.00 rows=42 width=64)
        
          
          SELECT customer_id, SUM(amount)
        
          
          FROM   orders
        
          
          WHERE  date_trunc('day', order_date) BETWEEN '2026-01-01' AND '2026-01-31'
        
          
          GROUP  BY customer_id;
        
          
           
        
          
          -- AFTER: rewrite the predicate as a half-open range. SARGable, index-eligible.
        
          
          -- Index Scan using idx_order_date on orders (cost=0.43..1247.18 rows=18432)
        
          
          -- 4.2s -> 12ms on a 4M-row table.
        
          
          SELECT customer_id, SUM(amount)
        
          
          FROM   orders
        
          
          WHERE  order_date >= '2026-01-01'
        
          
            AND  order_date <  '2026-02-01'
        
          
          GROUP  BY customer_id;
        

Coverage Map

Subjects and Languages Priya Covers

Course Matches

Courses Priya Specializes In

6.006 Massachusetts Institute of Technology

MIT 6.006: Introduction to Algorithms

MIT 6.006 introduces algorithms across 13 weeks with 26 lectures, 13 recitations, and 7 problem sets. The Spring 2020 redesign by Erik Demaine, Jason Ku, and Justin Solomon...

8 recurring assignments covered

Get help with 6.006

FAQ

Frequently Asked Questions

How do you diagnose a slow PostgreSQL query?
EXPLAIN (ANALYZE, BUFFERS) on the actual query, not an approximation of it. Read the plan bottom-up. Look for Seq Scan on tables larger than 10k rows, nested loops where a hash join would be cheaper, and any row-count estimate that differs from actual by more than 10x. A bad estimate usually means stale ANALYZE statistics. A Seq Scan on a filtered query usually means the index is unusable because of a function wrap or implicit cast on the indexed column.
When should a Django queryset use select_related vs prefetch_related?
select_related for ForeignKey and OneToOne (a SQL JOIN, single query). prefetch_related for ManyToMany and reverse ForeignKey (two queries, joined in Python). Mixing them in the same .objects.filter() chain is fine. The combined call deduplicates so you do not pay twice for an overlap.
A React component re-renders on every keystroke. How do you find the cause?
React DevTools Profiler, record one keystroke, look at the flamegraph. Components that re-render without their props changing are usually consuming a context whose value is a new object literal each render. Wrap the value in useMemo. If a useEffect runs on every render, an object or array dependency is being re-created in the parent each render; wrap that one in useMemo too.
What is the difference between a microtask and a macrotask in Node.js?
Macrotasks include setTimeout, setImmediate, and I/O callbacks; microtasks include Promise.then, queueMicrotask, and process.nextTick. After every macrotask, the entire microtask queue drains before the next macrotask runs. This is why an unhandled promise chain can starve a setTimeout callback, and why process.nextTick can starve I/O if recursively scheduled.
Do you cover database internals (B-trees, query planning, MVCC) at the CMU 15-445 level?
Yes. The CMU 15-445 course materials are public and I keep a working knowledge of the labs. B-tree implementation, buffer pool replacement policies, lock-based concurrency control, recovery via ARIES. Project deliverables are graded against the BusTub starter codebase and I match its conventions.
What is your stance on raw SQL in a Django project?
Use the ORM for 95% of queries because it stays in sync with model changes. Drop to raw SQL for the 5% where the query is complex enough that the ORM would obscure intent (window functions, recursive CTEs, JSONB operators). Wrap raw SQL in a model method so the application layer never sees a string concatenated with user input.

Work With Priya?

Submit your assignment with Priya in mind. We will route the request to the best-fit tutor based on subject, language, and current load. Average first reply inside 30 minutes during business hours.

Submit for Priya