Расскажите о вашем опыте работы с PostgreSQL: настройка, написание запросов и глубина погружения.
Asked at
AI answer
Describe your experience concretely and only within the scope of what you actually did: how you designed schemas and migrations, wrote queries, and worked with transactions. For a more in-depth answer, you can mention JOINs, CTEs and window functions, indexes, integrity constraints, isolation levels, as well as analyzing query plans with EXPLAIN (ANALYZE, BUFFERS) and optimizing slow queries. It is helpful to give one example: the problem, how you diagnosed it, what you changed, and what result you achieved. If you did not work on server configuration, distinguish that from your experience writing queries.
Also asked at GigaChat / Сбер
- app = FastAPI() def get_db(): db = SessionLocal() try: yield db finally: db.close() def heavy_text_parser(file_id: int, db: Session): # Parsing a file that takes 5 minutes parse_and_save(file_id, db) @app.post("/upload") async def upload_file( background_tasks: BackgroundTasks, db: Session = Depends(get_db) ): file_id = save_file_to_db(db) db.commit() background_tasks.add_task(heavy_text_parser, file_id, db) return {"status": "parsing started"}
- def extract_emails_from_huge_file(file_path: str) -> list[str]: with open(file_path, 'r', encoding='utf-8') as f: content = f.read() # Заменяем переносы строк, чтобы текст был "сплошным" content = content.replace('\r\n', ' ').replace('\n', ' ') lines = content.split(' ') emails = [word for word in lines if '@' in word] return emails
Similar questions
- Tell me about your experience optimizing queries and processes.
- Have you mainly worked with PostgreSQL or ClickHouse?
- Tell us about the most challenging feature or optimization you independently took from idea to production. What made it challenging?
- Briefly tell us about your experience: how long you’ve worked as a developer, your previous jobs, and more about your most recent role.
- What types of databases have you worked with? If NoSQL, what types of NoSQL databases are there?