Search on very big (partitioned) table

Started by Collini, ColliniConsulting.itabout 9 years ago4 messagesgeneral
Jump to latest
#1Collini, ColliniConsulting.it
Collini@colliniconsulting.it

Hu guys,

we have a test machine with Postgresql 9.6.1 an about 800.000.000 record in a table.
Table is partitioned by day, with indexes on partitioned table.

Also a simple query (for example i want to search log occurred in a specific day), is immediate in tha partitioned table (table_2017_02_15) but *extremely* slow in global table.

Where am i wrong?

Thank you!
/F

#2Adam Brusselback
adambrusselback@gmail.com
In reply to: Collini, ColliniConsulting.it (#1)
Re: Search on very big (partitioned) table

Do you have non overlapping check constraints on the partitions by date to
allow the planner to exclude the child tables from needing to be looked at?

#3Sushant Pawar
sushant.pawar@ashnik.com
In reply to: Adam Brusselback (#2)
Re: Search on very big (partitioned) table

What is the execution plan of a query is showing? Check whether it is
reading through all partitions.

Best Regards,

*Sushant Pawar | Database Solution Consultant*

*ASHNIK TECHNOLOGY SOLUTIONS PVT. LTD.*

Skype: sush_531 | T: +91 9769559995 <%2B65%206438%203504> | www.ashnik.com

On Tue, Feb 21, 2017 at 4:47 AM, Adam Brusselback <adambrusselback@gmail.com

Show quoted text

wrote:

Do you have non overlapping check constraints on the partitions by date to
allow the planner to exclude the child tables from needing to be looked at?

#4Job
Job@colliniconsulting.it
In reply to: Sushant Pawar (#3)
R: Search on very big (partitioned) table

Hi Sushant,

i think the problem is that we miss check constraints.
We will implement asap....

For the moment thank you to everybody for the excellent support!

/F