Stories tagged with SQL - DeveloperSites
1
likes
spam Like Dislike

The Many Faces of DISTINCT in PostgreSQL

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 7 hours, 52 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 2:18:07 PM GMT
I started my programming career as an Oracle DBA. It took a few years but eventually I got fed up with the corporate world and I went about doing my own thing. After I gotten over not having proper partitions and MERGE statement, I found some nice unique features in PostgreSQL. Oddly enough, a lot of them contained the word DISTINCT. (more)
category: PostgreSQL | clicked: 1 | comment | | source: hakibenita.com
tags: SQL
1
likes
spam Like Dislike

9 Django Tips for Working with Databases

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 7 hours, 55 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 2:14:17 PM GMT
ORMs offer great utility for developers but abstracting access to the database has its costs. Developers who are willing to poke around the database and change some defaults often find that great improvements can be made. (more)
category: Django | clicked: 1 | comment | | source: hakibenita.com
tags: ORM, Performance, PostgreSQL, SQL
1
likes
spam Like Dislike

Be Careful With CTE in PostgreSQL

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 8 hours, 37 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:32:43 PM GMT
PostgreSQL, SQL, PerformanceHow to avoid common pitfalls with common table expressions in PostgreSQL Common table expressions (CTE), also known as the WITH clause, are a very useful feature. They help break down big queries into smaller pieces which makes it easier to read and understand. PostgreSQL Version This article is intended for PostgreSQL versions 11 and prior. Starting at version 12, PostgreSQL changed the way it treats CTE to prevent the issues described in this article.Wha... (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: Performance, SQL
1
likes
spam Like Dislike

How We Solved a Storage Problem in PostgreSQL Without Adding a Single Byte of Storage

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 8 hours, 40 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:29:44 PM GMT
A while back we started getting alerts in the middle of the night on low disk space. A quick investigation led us to one of our ETL tasks. Every night the task was fired to eliminate duplicate dumps, and free up some space. This is a short story about how we found our silver bullet and solved the issue without adding a single byte of storage. (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: Performance, SQL
1
likes
spam Like Dislike

How to Create an Index in Django Without Downtime

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 8 hours, 46 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:23:53 PM GMT
In this step-by-step Python tutorial, you'll get a solid understanding of the limitations of Django migrations by tackling a well known problem: creating an index in Django with no downtime. (more)
category: Django | clicked: 1 | comment | | source: realpython.com
tags: ORM, PostgreSQL, SQL
1
likes
spam Like Dislike

How to Get the First or Last Value in a Group Using Group By in SQL

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 8 hours, 52 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:17:36 PM GMT
Getting the last value of a group in an aggregated query in PostgreSQL is a challenging task. In this article we present a simple way to get the first or last value of a group using group by. (more)
category: PostgreSQL | clicked: 1 | comment | | source: hakibenita.com
tags: SQL
1
likes
spam Like Dislike

How To Prevent SQL Injection Attacks With Python

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 8 hours, 54 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:15:20 PM GMT
SQL injection attacks are one of the most common web application security threat and one of the easiest to prevent. Web application attackers will surely test your web application for this security vulnerability so you must take steps to ensure that this security hole is plugged, and plugged fast! SQL injection attacks are made possible by allowing non-escaped single or double quote strings to be included in your database's SQL call. This can be done very easily by an attacker by including a partial SQL... (more)
category: Python | clicked: 7 | 1 comment | | source: realpython.com
tags: ORM, PostgreSQL, Security, SQL
1
likes
spam Like Dislike

12 Common Mistakes and Missed Optimization Opportunities in SQL

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 8 hours, 57 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:12:55 PM GMT
SQL is used by analysts, data scientists, product managers, designers and many others. These professionals have access to databases, but they don't always have the intuition and understanding to write efficient queries. In an effort to make my team write better SQL, I went over reports written by non-developers and code reviews, and gathered common mistakes and missed optimization opportunities in SQL. (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: Performance, SQL
1
likes
spam Like Dislike

The Surprising Impact of Medium-Size Texts on PostgreSQL Performance

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 9 hours, 9 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 1:00:22 PM GMT
Any database schema is likely to have plenty of text fields. In this article I demonstrate the surprising impact of medium-size texts on query performance. (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: Performance, SQL
1
likes
spam Like Dislike

Re-Introducing Hash Indexes in PostgreSQL

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 9 hours, 10 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 12:59:22 PM GMT
There is a type of index you are probably not using, and may have never even heard of. It is wildly unpopular, and until a few PostgreSQL versions ago it was highly discouraged and borderline unusable, but under some circumstances it can out-perform even a B-Tree index. (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: Performance, SQL
1
likes
spam Like Dislike

Practical SQL for Data Analysis

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 9 hours, 13 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 12:56:24 PM GMT
Pandas is by far the most popular tool for data analysis. It's packed with useful features, it's battle tested and widely accepted. However, pandas comes at a cost which is often overlooked. SQL databases has been around since the 1970s. They contain many features that most developers never heard of, and I want to bring some of them to light. (more)
category: PostgreSQL | clicked: 0 | comment | | source: hakibenita.com
tags: SQL
1
likes
spam Like Dislike

18+ Powerful PostgreSQL Features You Didn't Know Existed

published 1086 days, 5 hours, 26 minutes ago posted by matthewpomarmatthewpomar 1095 days, 9 hours, 34 minutes ago
Sunday, December 19, 2021 4:44:10 PM GMT Friday, December 10, 2021 12:35:29 PM GMT
PostgreSQL is a powerful, full featured relational database management system. However, this free and open-source DBMS has a surprising number of fantastic features most PostgreSQL developers don't know anything about. In this article, Haki Benita, a renown and respected blogger on PostgreSQL, Python, and related technologies, list more than 18 lesser known PostgreSQL features that can improve your productivity and make your life easier as a PostgreSQL developer or admin. (more)
category: PostgreSQL | clicked: 7 | 1 comment | | source: hakibenita.com
tags: SQL