If all those IDs are in fact UUIDs, the columns should be defined with the uuid type.
The supposedly "magic" limit of 255 does not enable some hidden performance or storage optimizations (at least in Postgres). So blindly using varchar(255) doesn't really make sense (of course if you have a valid business requirement that a value for order_type or event_type may never be longer than 255 characters, then of course keep that constraint.
As documented in the manual there is also no "length" parameter for the integer data type (and it's not a value restriction in MySQL either, so it's pretty much useless to begin with).
So the DDL should be something like this:
CREATE TABLE event_test(
ID uuid PRIMARY KEY NOT NULL,
VERSION integer NOT NULL,
ORDER_TYPE varchar(255) NOT NULL,
EVENT_TYPE varchar(255) NOT NULL,
CUSTOMER_ID uuid DEFAULT NULL,
DETAILS text,
OBJECT_TYPE varchar(255) NOT NULL,
UTC_DATE_TIME date DEFAULT NULL,
EVENT_TO_UTC_DT date DEFAULT NULL,
GROUP_ID uuid DEFAULT NULL,
OBJECT_NAME varchar(2001) DEFAULT NULL,
OBJECT_ID uuid DEFAULT NULL,
USER_NAME varchar(1500) DEFAULT NULL,
USER_ID uuid DEFAULT NULL,
PT_EVENT_ID uuid DEFAULT NULL,
CUSTOM_NOTES varchar(1000) DEFAULT NULL,
SUMMARY varchar(4000) DEFAULT NULL
);
To create an index, you use create index:
create index on event_test (customer_id,object_type,object_id,pt_event_id);
If "most of your access" is through the object_id then you need an index where that is the leading column:
create index on event_test (object_id);
Hash partitioning won't really help you there to make things faster.
You can use partitioning for the table, but this is hardly a performance tool. Due to the limitations of the Postgres partitioning implementation you will also be forced to include the id column in the partitioning key if you want to keep that as the primary key. But given your statement that "most access is through object_id the partitioning key (id, object_id) wouldn't help you at all.
varchar(255)is not by any means more efficient thanvarchar(257)- the 255 limit does not open up any magic performance optimizations if you expected that.integerorbigintcolumns. Don't store everything invarchar(255). And `int(11)´ is not valid for Postgres to begin withuuiddata type.