Re: Partition with check constraint with "like"

2021-05-20 Thread Michael Lewis
On Thu, May 20, 2021, 8:38 PM Justin Pryzby wrote: > On Fri, May 21, 2021 at 02:36:14AM +, Nagaraj Raj wrote: > > Thank you. This is a great help. > > But "a" have some records with alpha and numeric. > > So then you should make one or more partitions FROM ('1')TO('9'). > What about 0? Sorr

Re: Partition with check constraint with "like"

2021-05-20 Thread Justin Pryzby
On Fri, May 21, 2021 at 02:36:14AM +, Nagaraj Raj wrote: > Thank you. This is a great help.  > But "a" have some records with alpha and numeric.  So then you should make one or more partitions FROM ('1')TO('9'). > example : > insert into mytable values('alpha'),('bravo'); > insert into mytab

Re: Partition with check constraint with "like"

2021-05-20 Thread Nagaraj Raj
Thank you. This is a great help.  But "a" have some records with alpha and numeric.  example : insert into mytable values('alpha'),('bravo'); insert into mytable values('1lpha'),('2ravo'); On Thursday, May 20, 2021, 06:23:14 PM PDT, David Rowley wrote: On Fri, 21 May 2021 at 12:32, Na

Re: Partition with check constraint with "like"

2021-05-20 Thread David Rowley
On Fri, 21 May 2021 at 12:32, Nagaraj Raj wrote: > I am trying to create partitions on the table based on first letter of the > column record value using inherit relation & check constraint. You'll get much better performance out of native partitioning than you will with the old inheritance met

Partition with check constraint with "like"

2021-05-20 Thread Nagaraj Raj
Hi, I am trying to create partitions on the table based on first letter of the column record  value using inherit relation & check constraint. Somehow able to create and load the data into the tables as per my requirement. But the problem is when querying the data on that partitioned column, it'