Quantcast

[SQL] index row size 2728 exceeds btree maximum, 2713

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[SQL] index row size 2728 exceeds btree maximum, 2713

Dinesh Pandey

TABLE

-----------+-----------------------+-----------

  Column    |         Type      

-----------+-----------------------+-----------

 scan_id    | bigint               

 host_ip    | character varying(15)

 port_num | integer              

 plugin_id  | integer               

 severity   | character varying(50)

 data       | text                 

Indexes:

    "pk_scanned_port_info" PRIMARY KEY, btree (scan_id, host_ip, port_num, plugin_id, severity, data)

 

 

On inserting record I am getting this error “index row size 2728 exceeds btree maximum, 2713

 

How to solve this problem?

 

 

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GENERAL] [SQL] index row size 2728 exceeds btree maximum, 2713

Ramakrishnan Muralidharan
         Hi,
 
             The issue looks like your Index width exceeds the maximum width  of the index key limit, Please review the keys used in the index.
 
Regards,
R.Muralidharan
 
     
-----Original Message-----
From: [hidden email] [mailto:[hidden email]]On Behalf Of Dinesh Pandey
Sent: Thursday, June 02, 2005 12:35 PM
To: [hidden email]; 'PostgreSQL'
Subject: [SQL] index row size 2728 exceeds btree maximum, 2713

TABLE

-----------+-----------------------+-----------

  Column    |         Type      

-----------+-----------------------+-----------

 scan_id    | bigint               

 host_ip    | character varying(15)

 port_num | integer              

 plugin_id  | integer               

 severity   | character varying(50)

 data       | text                 

Indexes:

    "pk_scanned_port_info" PRIMARY KEY, btree (scan_id, host_ip, port_num, plugin_id, severity, data)

 

 

On inserting record I am getting this error “index row size 2728 exceeds btree maximum, 2713

 

How to solve this problem?

 

 

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [SQL] index row size 2728 exceeds btree maximum, 2713

Dinesh Pandey

Hi,

 

One of the columns in primary key is of type “TEXT”. I am able to insert with small data, but for around 3000 characters it’s failing. How to handle that?

 

Thanks
Dinesh Pandey


From: Ramakrishnan Muralidharan [mailto:[hidden email]]
Sent: Thursday, June 02, 2005 3:11 PM
To: [hidden email]; [hidden email]; PostgreSQL
Subject: RE: [SQL] index row size 2728 exceeds btree maximum, 2713

 

         Hi,

 

             The issue looks like your Index width exceeds the maximum width  of the index key limit, Please review the keys used in the index.

 

Regards,

R.Muralidharan

 

     

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]On Behalf Of Dinesh Pandey
Sent: Thursday, June 02, 2005 12:35 PM
To: [hidden email]; 'PostgreSQL'
Subject: [SQL] index row size 2728 exceeds btree maximum, 2713

TABLE

-----------+-----------------------+-----------

  Column    |         Type      

-----------+-----------------------+-----------

 scan_id    | bigint               

 host_ip    | character varying(15)

 port_num | integer              

 plugin_id  | integer               

 severity   | character varying(50)

 data       | text                 

Indexes:

    "pk_scanned_port_info" PRIMARY KEY, btree (scan_id, host_ip, port_num, plugin_id, severity, data)

 

 

On inserting record I am getting this error “index row size 2728 exceeds btree maximum, 2713

 

How to solve this problem?

 

 

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GENERAL] index row size 2728 exceeds btree maximum, 2713

Richard Huxton
In reply to this post by Dinesh Pandey
Dinesh Pandey wrote:

> -----------+-----------------------+-----------
>   Column    |         Type      
> -----------+-----------------------+-----------
>  scan_id    | bigint                
>  host_ip    | character varying(15)
>  port_num | integer              
>  plugin_id  | integer              
>  severity   | character varying(50)
>  data       | text                  
>
> Indexes:
>     "pk_scanned_port_info" PRIMARY KEY, btree (scan_id, host_ip, port_num,
> plugin_id, severity, data)
>
> On inserting record I am getting this error "index row size 2728 exceeds
> btree maximum, 2713"

Well - the error message is clear enough. The question is, what to do.

Without knowing what the table "means", it's difficult to say what the
primary-key should be, but it seems unlikely to include an
unlimited-length text-field called "data".

If the data itself doesn't offer any suitable candidate keys (as can
well be the case) then common practice is to generate a unique number
and use that as an ID - in PostgreSQL's case by use of the SERIAL
pseudo-type.

Does that help?
--
   Richard Huxton
   Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [SQL] [GENERAL] index row size 2728 exceeds btree maximum, 2713

Dinesh Pandey
I am inserting some log messages in the column "data". (Basically I am
inserting records from reading an xml file)

In the PRIMARY KEY, btree (scan_id, host_ip, port_num, plugin_id, severity,
data) data is of type TEXT and can contain long string values.

The question is how to remove this error "index row size 2728 exceeds btree
maximum, 2713" by increasing the btree size?

The big problem is "I can not add any additional column in this table."

Thanks
Dinesh Pandey

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Richard Huxton
Sent: Thursday, June 02, 2005 3:29 PM
To: [hidden email]
Cc: [hidden email]; 'PostgreSQL'
Subject: Re: [GENERAL] index row size 2728 exceeds btree maximum, 2713

Dinesh Pandey wrote:

> -----------+-----------------------+-----------
>   Column    |         Type      
> -----------+-----------------------+-----------
>  scan_id    | bigint                
>  host_ip    | character varying(15)
>  port_num | integer              
>  plugin_id  | integer              
>  severity   | character varying(50)
>  data       | text                  
>
> Indexes:
>     "pk_scanned_port_info" PRIMARY KEY, btree (scan_id, host_ip, port_num,
> plugin_id, severity, data)
>
> On inserting record I am getting this error "index row size 2728 exceeds
> btree maximum, 2713"

Well - the error message is clear enough. The question is, what to do.

Without knowing what the table "means", it's difficult to say what the
primary-key should be, but it seems unlikely to include an
unlimited-length text-field called "data".

If the data itself doesn't offer any suitable candidate keys (as can
well be the case) then common practice is to generate a unique number
and use that as an ID - in PostgreSQL's case by use of the SERIAL
pseudo-type.

Does that help?
--
   Richard Huxton
   Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [hidden email])
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GENERAL] [SQL] index row size 2728 exceeds btree maximum, 2713

Martijn van Oosterhout
In reply to this post by Dinesh Pandey
On Thu, Jan 01, 2004 at 03:13:48PM +0530, Dinesh Pandey wrote:
> One of the columns in primary key is of type "TEXT". I am able to insert
> with small data, but for around 3000 characters it's failing. How to handle
> that?

Easy, btree indexes can't handle data with more that 2713 bytes.

You need to decide if having a single index on all your columns is
actually what you want. Depending on your queries it may not even be
used.

Hope this helps,

> From: Ramakrishnan Muralidharan
> [mailto:[hidden email]]
> Sent: Thursday, June 02, 2005 3:11 PM
> To: [hidden email]; [hidden email]; PostgreSQL
> Subject: RE: [SQL] index row size 2728 exceeds btree maximum, 2713
>
>  
>
>          Hi,
>
>  
>
>              The issue looks like your Index width exceeds the maximum width
> of the index key limit, Please review the keys used in the index.
>
>  
>
> Regards,
>
> R.Muralidharan
>
>  
>
>      
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Dinesh Pandey
> Sent: Thursday, June 02, 2005 12:35 PM
> To: [hidden email]; 'PostgreSQL'
> Subject: [SQL] index row size 2728 exceeds btree maximum, 2713
>
> TABLE
>
> -----------+-----------------------+-----------
>
>   Column    |         Type      
>
> -----------+-----------------------+-----------
>
>  scan_id    | bigint                
>
>  host_ip    | character varying(15)
>
>  port_num | integer              
>
>  plugin_id  | integer              
>
>  severity   | character varying(50)
>
>  data       | text                  
>
> Indexes:
>
>     "pk_scanned_port_info" PRIMARY KEY, btree (scan_id, host_ip, port_num,
> plugin_id, severity, data)
>
>  
>
>  
>
> On inserting record I am getting this error "index row size 2728 exceeds
> btree maximum, 2713"
>
>  
>
> How to solve this problem?
>
>  
>
>  
>
>  
>
--
Martijn van Oosterhout   <[hidden email]>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

attachment0 (240 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [SQL] [GENERAL] index row size 2728 exceeds btree maximum, 2713

Richard Huxton
In reply to this post by Dinesh Pandey
Dinesh Pandey wrote:
> I am inserting some log messages in the column "data". (Basically I am
> inserting records from reading an xml file)
>
> In the PRIMARY KEY, btree (scan_id, host_ip, port_num, plugin_id, severity,
> data) data is of type TEXT and can contain long string values.

I'm still not convinced that "data" makes a sensible part of the primary
key. Can you give an example of "data" and explain why the whole value
determines unique-ness?

> The question is how to remove this error "index row size 2728 exceeds btree
> maximum, 2713" by increasing the btree size?
>
> The big problem is "I can not add any additional column in this table."

Why not?

--
   Richard Huxton
   Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GENERAL] [SQL] index row size 2728 exceeds btree maximum, 2713

Ramakrishnan Muralidharan
In reply to this post by Dinesh Pandey
         Hi
 
             It is not advisable to add a variable length data field in the Index key, since it is very difficult predict the size of the field which may vary from record to record. 
 
             are you included this field for Full text search on data field?
 
Regards,
R.Muralidharan
-----Original Message-----
From: [hidden email] [mailto:[hidden email]]On Behalf Of Dinesh Pandey
Sent: Thursday, January 01, 2004 3:14 PM
To: Ramakrishnan Muralidharan; [hidden email]; 'PostgreSQL'
Subject: Re: [SQL] index row size 2728 exceeds btree maximum, 2713

Hi,

 

One of the columns in primary key is of type “TEXT”. I am able to insert with small data, but for around 3000 characters it’s failing. How to handle that?

 

Thanks
Dinesh Pandey


From: Ramakrishnan Muralidharan [mailto:[hidden email]]
Sent: Thursday, June 02, 2005 3:11 PM
To: [hidden email]; [hidden email]; PostgreSQL
Subject: RE: [SQL] index row size 2728 exceeds btree maximum, 2713

 

         Hi,

 

             The issue looks like your Index width exceeds the maximum width  of the index key limit, Please review the keys used in the index.

 

Regards,

R.Muralidharan

 

     

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]On Behalf Of Dinesh Pandey
Sent: Thursday, June 02, 2005 12:35 PM
To: [hidden email]; 'PostgreSQL'
Subject: [SQL] index row size 2728 exceeds btree maximum, 2713

TABLE

-----------+-----------------------+-----------

  Column    |         Type      

-----------+-----------------------+-----------

 scan_id    | bigint               

 host_ip    | character varying(15)

 port_num | integer              

 plugin_id  | integer               

 severity   | character varying(50)

 data       | text                 

Indexes:

    "pk_scanned_port_info" PRIMARY KEY, btree (scan_id, host_ip, port_num, plugin_id, severity, data)

 

 

On inserting record I am getting this error “index row size 2728 exceeds btree maximum, 2713

 

How to solve this problem?

 

 

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [GENERAL] [SQL] index row size 2728 exceeds btree maximum, 2713

Dinesh Pandey

Yes I am storing some “error messages” in data column, and the PK columns are party of search criteria.

 

Thanks
Dinesh Pandey


From: Ramakrishnan Muralidharan [mailto:[hidden email]]
Sent: Thursday, June 02, 2005 4:44 PM
To: [hidden email]; [hidden email]; PostgreSQL
Subject: RE: [SQL] index row size 2728 exceeds btree maximum, 2713

 

         Hi

 

             It is not advisable to add a variable length data field in the Index key, since it is very difficult predict the size of the field which may vary from record to record. 

 

             are you included this field for Full text search on data field?

 

Regards,

R.Muralidharan

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]On Behalf Of Dinesh Pandey
Sent: Thursday, January 01, 2004 3:14 PM
To: Ramakrishnan Muralidharan; [hidden email]; 'PostgreSQL'
Subject: Re: [SQL] index row size 2728 exceeds btree maximum, 2713

Hi,

 

One of the columns in primary key is of type “TEXT”. I am able to insert with small data, but for around 3000 characters it’s failing. How to handle that?

 

Thanks
Dinesh Pandey


From: Ramakrishnan Muralidharan [mailto:[hidden email]]
Sent: Thursday, June 02, 2005 3:11 PM
To: [hidden email]; [hidden email]; PostgreSQL
Subject: RE: [SQL] index row size 2728 exceeds btree maximum, 2713

 

         Hi,

 

             The issue looks like your Index width exceeds the maximum width  of the index key limit, Please review the keys used in the index.

 

Regards,

R.Muralidharan

 

     

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]On Behalf Of Dinesh Pandey
Sent: Thursday, June 02, 2005 12:35 PM
To: [hidden email]; 'PostgreSQL'
Subject: [SQL] index row size 2728 exceeds btree maximum, 2713

TABLE

-----------+-----------------------+-----------

  Column    |         Type      

-----------+-----------------------+-----------

 scan_id    | bigint               

 host_ip    | character varying(15)

 port_num | integer              

 plugin_id  | integer               

 severity   | character varying(50)

 data       | text                 

Indexes:

    "pk_scanned_port_info" PRIMARY KEY, btree (scan_id, host_ip, port_num, plugin_id, severity, data)

 

 

On inserting record I am getting this error “index row size 2728 exceeds btree maximum, 2713

 

How to solve this problem?

 

 

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [SQL] index row size 2728 exceeds btree maximum, 2713

Bruno Wolff III
On Thu, Jun 02, 2005 at 17:48:47 +0530,
  Dinesh Pandey <[hidden email]> wrote:
> Yes I am storing some "error messages" in data column, and the PK columns
> are party of search criteria.

If you need to be able to search based on the entire stored error message,
than you might try adding an indexed hash column to the table and using that
to speed up searches. You can still compare the full string in case you
have a hash collision, but those should be very rare.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match
Loading...