PostgreSQL allows you to create "partial indexes", which are mainly indexes with conditional predicates. http://www.postgresql.org/docs/8.2/static/indexes-partial.html
During testing, I found that they work very well for the case when the query has access to only some 12 rows in a table with 120 thousand rows.
But before we apply this, are there any flaws or reservations we should be aware of?
- . , , .
Orders, , order_status :
Orders
order_status
where order_status = 'New', , , . 12 120k .
where order_status = 'New'
Pro:
, , . ,
Con:
, , , .
Source: https://habr.com/ru/post/1699447/More articles:Multi-platform SQL query calculator - sqlIs there a way to place aspx files in a class library in Visual Studio 2008 .NET 3.5? - c #Getting client system information from a Rails application - ruby ββ| fooobar.comUsing events declared in Visual Basic 6.0 in a dotnet application - .netwhy download only for apt-get cron job - cronSaving Using Hibernation / JPA - javaCreating dynamic tables in Word using C # .NET - c #What is your efficiency by deleting XML in Java projects? - javaHow do they draw charts / graphs in stackoverflow? - vector-graphicsHow can I call a C ++ function from C #? - c ++All Articles