Re: FUNC_MAX_ARGS benchmarks
Re: FUNC_MAX_ARGS benchmarks
I have applied the attached patch which changes NAMEDATALEN to 64 and
FUNC_MAX_ARGS/INDEX_MAX_KEYS to 32. Hopefully this will keep people
happy for a few more years.
initdb required.
---------------------------------------------------------------------------
Christopher Kings-Lynne wrote:
> > > NAMEDATALEN will be 64 or 128 in 7.3. At this point, we better decide
> > > which one we prefer.
> > >
> > > The conservative approach would be to go for 64 and perhaps increase it
> > > again in 7.4 after we get feedback and real-world usage. If we go to
> > > 128, we will have trouble decreasing it if there are performance
> > > problems.
> >
> > I guess I'd also agree with:
> > FUNC_MAX_ARGS 32
> > NAMEDATALEN 64
> > and work on the performance issues for 7.4.
>
> I agree too.
>
> Chris
>
>
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Index: doc/FAQ_DEV
===================================================================
RCS file: /cvsroot/pgsql-server/doc/FAQ_DEV,v
retrieving revision 1.43
diff -c -r1.43 FAQ_DEV
*** doc/FAQ_DEV 17 Apr 2002 05:12:39 -0000 1.43
--- doc/FAQ_DEV 13 Aug 2002 20:17:54 -0000
***************
*** 560,566 ****
Table, column, type, function, and view names are stored in system
tables in columns of type Name. Name is a fixed-length,
null-terminated type of NAMEDATALEN bytes. (The default value for
! NAMEDATALEN is 32 bytes.)
typedef struct nameData
{
char data[NAMEDATALEN];
--- 560,566 ----
Table, column, type, function, and view names are stored in system
tables in columns of type Name. Name is a fixed-length,
null-terminated type of NAMEDATALEN bytes. (The default value for
! NAMEDATALEN is 64 bytes.)
typedef struct nameData
{
char data[NAMEDATALEN];
Index: doc/src/sgml/datatype.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/datatype.sgml,v
retrieving revision 1.97
diff -c -r1.97 datatype.sgml
*** doc/src/sgml/datatype.sgml 5 Aug 2002 19:43:30 -0000 1.97
--- doc/src/sgml/datatype.sgml 13 Aug 2002 20:17:56 -0000
***************
*** 914,920 ****
PostgreSQL. The name type
exists only for storage of internal catalog
names and is not intended for use by the general user. Its length
! is currently defined as 32 bytes (31 usable characters plus terminator)
but should be referenced using the macro
NAMEDATALEN. The length is set at compile time
(and is therefore adjustable for special uses); the default
--- 914,920 ----
PostgreSQL. The name type
exists only for storage of internal catalog
names and is not intended for use by the general user. Its length
! is currently defined as 64 bytes (63 usable characters plus terminator)
but should be referenced using the macro
NAMEDATALEN. The length is set at compile time
(and is therefore adjustable for special uses); the default
***************
*** 943,950 ****
name
! 32 bytes
! Thirty-one character internal type
--- 943,950 ----
name
! 64 bytes
! Sixty-three character internal type
Index: doc/src/sgml/indices.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/indices.sgml,v
retrieving revision 1.35
diff -c -r1.35 indices.sgml
*** doc/src/sgml/indices.sgml 30 Jul 2002 17:34:37 -0000 1.35
--- doc/src/sgml/indices.sgml 13 Aug 2002 20:17:56 -0000
***************
*** 236,242 ****
Currently, only the B-tree and GiST implementations support multicolumn
! indexes. Up to 16 columns may be specified. (This limit can be
altered when building PostgreSQL; see the
file pg_config.h.)
--- 236,242 ----
Currently, only the B-tree and GiST implementations support multicolumn
! indexes. Up to 32 columns may be specified. (This limit can be
altered when building PostgreSQL; see the
file pg_config.h.)
Index: doc/src/sgml/manage.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/manage.sgml,v
retrieving revision 1.22
diff -c -r1.22 manage.sgml
*** doc/src/sgml/manage.sgml 10 Aug 2002 19:35:00 -0000 1.22
--- doc/src/sgml/manage.sgml 13 Aug 2002 20:17:57 -0000
***************
*** 70,76 ****
You automatically become the
database administrator of the database you just created.
Database names must have an alphabetic first
! character and are limited to 31 characters in length.
PostgreSQL allows you to create any number of
databases at a given site.
--- 70,76 ----
You automatically become the
database administrator of the database you just created.
Database names must have an alphabetic first
! character and are limited to 63 characters in length.
PostgreSQL allows you to create any number of
databases at a given site.
Index: doc/src/sgml/start.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/start.sgml,v
retrieving revision 1.23
diff -c -r1.23 start.sgml
*** doc/src/sgml/start.sgml 10 Aug 2002 19:35:00 -0000 1.23
--- doc/src/sgml/start.sgml 13 Aug 2002 20:17:57 -0000
***************
*** 231,237 ****
You can also create databases with other names.
PostgreSQL allows you to create any
number of databases at a given site. Database names must have an
! alphabetic first character and are limited to 31 characters in
length. A convenient choice is to create a database with the same
name as your current user name. Many tools assume that database
name as the default, so it can save you some typing. To create
--- 231,237 ----
You can also create databases with other names.
PostgreSQL allows you to create any
number of databases at a given site. Database names must have an
! alphabetic first character and are limited to 63 characters in
length. A convenient choice is to create a database with the same
name as your current user name. Many tools assume that database
name as the default, so it can save you some typing. To create
Index: doc/src/sgml/syntax.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/syntax.sgml,v
retrieving revision 1.65
diff -c -r1.65 syntax.sgml
*** doc/src/sgml/syntax.sgml 10 Aug 2002 19:01:53 -0000 1.65
--- doc/src/sgml/syntax.sgml 13 Aug 2002 20:17:58 -0000
***************
*** 120,127 ****
The system uses no more than NAMEDATALEN-1
characters of an identifier; longer names can be written in
commands, but they will be truncated. By default,
! NAMEDATALEN is 32 so the maximum identifier length
! is 31 (but at the time the system is built,
NAMEDATALEN can be changed in
src/include/postgres_ext.h).
--- 120,127 ----
The system uses no more than NAMEDATALEN-1
characters of an identifier; longer names can be written in
commands, but they will be truncated. By default,
! NAMEDATALEN is 64 so the maximum identifier length
! is 63 (but at the time the system is built,
NAMEDATALEN can be changed in
src/include/postgres_ext.h).
Index: doc/src/sgml/ref/create_index.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/create_index.sgml,v
retrieving revision 1.35
diff -c -r1.35 create_index.sgml
*** doc/src/sgml/ref/create_index.sgml 30 Jul 2002 17:34:37 -0000 1.35
--- doc/src/sgml/ref/create_index.sgml 13 Aug 2002 20:17:58 -0000
***************
*** 339,345 ****
Currently, only the B-tree and gist access methods support multicolumn
! indexes. Up to 16 keys may be specified by default (this limit
can be altered when building
PostgreSQL). Only B-tree currently supports
unique indexes.
--- 339,345 ----
Currently, only the B-tree and gist access methods support multicolumn
! indexes. Up to 32 keys may be specified by default (this limit
can be altered when building
PostgreSQL). Only B-tree currently supports
unique indexes.
Index: doc/src/sgml/ref/current_user.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/current_user.sgml,v
retrieving revision 1.6
diff -c -r1.6 current_user.sgml
*** doc/src/sgml/ref/current_user.sgml 21 Apr 2002 19:02:39 -0000 1.6
--- doc/src/sgml/ref/current_user.sgml 13 Aug 2002 20:17:59 -0000
***************
*** 77,83 ****
Notes
! Data type "name" is a non-standard 31-character type for storing
system identifiers.
--- 77,83 ----
Notes
! Data type "name" is a non-standard 63-character type for storing
system identifiers.
Index: doc/src/sgml/ref/listen.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/listen.sgml,v
retrieving revision 1.13
diff -c -r1.13 listen.sgml
*** doc/src/sgml/ref/listen.sgml 21 Apr 2002 19:02:39 -0000 1.13
--- doc/src/sgml/ref/listen.sgml 13 Aug 2002 20:17:59 -0000
***************
*** 146,152 ****
it need not correspond to the name of any actual table. If
notifyname
is enclosed in double-quotes, it need not even be a syntactically
! valid name, but can be any string up to 31 characters long.
In some previous releases of
--- 146,152 ----
it need not correspond to the name of any actual table. If
notifyname
is enclosed in double-quotes, it need not even be a syntactically
! valid name, but can be any string up to 63 characters long.
In some previous releases of
Index: doc/src/sgml/ref/notify.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/notify.sgml,v
retrieving revision 1.17
diff -c -r1.17 notify.sgml
*** doc/src/sgml/ref/notify.sgml 21 Apr 2002 19:02:39 -0000 1.17
--- doc/src/sgml/ref/notify.sgml 13 Aug 2002 20:17:59 -0000
***************
*** 180,186 ****
it need not correspond to the name of any actual table. If
name
is enclosed in double-quotes, it need not even be a syntactically
! valid name, but can be any string up to 31 characters long.
In some previous releases of
--- 180,186 ----
it need not correspond to the name of any actual table. If
name
is enclosed in double-quotes, it need not even be a syntactically
! valid name, but can be any string up to 63 characters long.
In some previous releases of
Index: doc/src/sgml/ref/unlisten.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/ref/unlisten.sgml,v
retrieving revision 1.18
diff -c -r1.18 unlisten.sgml
*** doc/src/sgml/ref/unlisten.sgml 21 Apr 2002 19:02:39 -0000 1.18
--- doc/src/sgml/ref/unlisten.sgml 13 Aug 2002 20:17:59 -0000
***************
*** 114,120 ****
notifyname
need not be a valid class name but can be any string valid
! as a name up to 32 characters long.
The backend does not complain if you UNLISTEN something you were not
--- 114,120 ----
notifyname
need not be a valid class name but can be any string valid
! as a name up to 64 characters long.
The backend does not complain if you UNLISTEN something you were not
Index: src/bin/psql/command.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/command.c,v
retrieving revision 1.75
diff -c -r1.75 command.c
*** src/bin/psql/command.c 10 Aug 2002 03:56:23 -0000 1.75
--- src/bin/psql/command.c 13 Aug 2002 20:18:01 -0000
***************
*** 1513,1519 ****
sys = malloc(strlen(editorName) + strlen(fname) + 32 + 1);
if (!sys)
return false;
! sprintf(sys, "exec %s %s", editorName, fname);
result = system(sys);
if (result == -1)
psql_error("could not start editor %s\n", editorName);
--- 1513,1519 ----
sys = malloc(strlen(editorName) + strlen(fname) + 32 + 1);
if (!sys)
return false;
! snprintf(sys, 32, "exec %s %s", editorName, fname);
result = system(sys);
if (result == -1)
psql_error("could not start editor %s\n", editorName);
Index: src/include/pg_config.h.in
===================================================================
RCS file: /cvsroot/pgsql-server/src/include/pg_config.h.in,v
retrieving revision 1.26
diff -c -r1.26 pg_config.h.in
*** src/include/pg_config.h.in 31 Jul 2002 17:19:54 -0000 1.26
--- src/include/pg_config.h.in 13 Aug 2002 20:18:02 -0000
***************
*** 162,168 ****
* switch statement in fmgr_oldstyle() in src/backend/utils/fmgr/fmgr.c.
* But consider converting such functions to new-style instead...
*/
! #define INDEX_MAX_KEYS 16
#define FUNC_MAX_ARGS INDEX_MAX_KEYS
/*
--- 162,168 ----
* switch statement in fmgr_oldstyle() in src/backend/utils/fmgr/fmgr.c.
* But consider converting such functions to new-style instead...
*/
! #define INDEX_MAX_KEYS 32
#define FUNC_MAX_ARGS INDEX_MAX_KEYS
/*
Index: src/include/postgres_ext.h
===================================================================
RCS file: /cvsroot/pgsql-server/src/include/postgres_ext.h,v
retrieving revision 1.10
diff -c -r1.10 postgres_ext.h
*** src/include/postgres_ext.h 30 Apr 2002 19:53:03 -0000 1.10
--- src/include/postgres_ext.h 13 Aug 2002 20:18:02 -0000
***************
*** 41,46 ****
*
* NOTE that databases with different NAMEDATALEN's cannot interoperate!
*/
! #define NAMEDATALEN 32
#endif
--- 41,46 ----
*
* NOTE that databases with different NAMEDATALEN's cannot interoperate!
*/
! #define NAMEDATALEN 64
#endif
Index: src/include/catalog/catversion.h
===================================================================
RCS file: /cvsroot/pgsql-server/src/include/catalog/catversion.h,v
retrieving revision 1.147
diff -c -r1.147 catversion.h
*** src/include/catalog/catversion.h 9 Aug 2002 16:45:14 -0000 1.147
--- src/include/catalog/catversion.h 13 Aug 2002 20:18:02 -0000
***************
*** 53,58 ****
*/
/* yyyymmddN */
! #define CATALOG_VERSION_NO 200208091
#endif
--- 53,58 ----
*/
/* yyyymmddN */
! #define CATALOG_VERSION_NO 200208131
#endif
Index: src/interfaces/jdbc/org/postgresql/errors.properties
===================================================================
RCS file: /cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/errors.properties,v
retrieving revision 1.13
diff -c -r1.13 errors.properties
*** src/interfaces/jdbc/org/postgresql/errors.properties 24 Jun 2002 06:16:27 -0000 1.13
--- src/interfaces/jdbc/org/postgresql/errors.properties 13 Aug 2002 20:18:02 -0000
***************
*** 61,67 ****
postgresql.res.colrange:The column index is out of range.
postgresql.res.nextrequired:Result set not positioned properly, perhaps you need to call next().
postgresql.serial.interface:You cannot serialize an interface.
! postgresql.serial.namelength:Class & Package name length cannot be longer than 32 characters. {0} is {1} characters.
postgresql.serial.noclass:No class found for {0}
postgresql.serial.table:The table for {0} is not in the database. Contact the DBA, as the database is in an inconsistent state.
postgresql.serial.underscore:Class names may not have _ in them. You supplied {0}.
--- 61,67 ----
postgresql.res.colrange:The column index is out of range.
postgresql.res.nextrequired:Result set not positioned properly, perhaps you need to call next().
postgresql.serial.interface:You cannot serialize an interface.
! postgresql.serial.namelength:Class & Package name length cannot be longer than 64 characters. {0} is {1} characters.
postgresql.serial.noclass:No class found for {0}
postgresql.serial.table:The table for {0} is not in the database. Contact the DBA, as the database is in an inconsistent state.
postgresql.serial.underscore:Class names may not have _ in them. You supplied {0}.
Index: src/interfaces/jdbc/org/postgresql/util/Serialize.java
===================================================================
RCS file: /cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/util/Serialize.java,v
retrieving revision 1.11
diff -c -r1.11 Serialize.java
*** src/interfaces/jdbc/org/postgresql/util/Serialize.java 23 Jul 2002 03:59:55 -0000 1.11
--- src/interfaces/jdbc/org/postgresql/util/Serialize.java 13 Aug 2002 20:18:03 -0000
***************
*** 57,63 ****
* There are a number of limitations placed on the java class to be
* used by Serialize:
* -
! *
- The class name must be less than 32 chars long and must be all lowercase.
* This is due to limitations in Postgres about the size of table names.
* The name must be all lowercase since table names in Postgres are
* case insensitive and the relname is stored in lowercase. Unless some
--- 57,63 ----
* There are a number of limitations placed on the java class to be
* used by Serialize:
*
-
! *
- The class name must be less than 64 chars long and must be all lowercase.
* This is due to limitations in Postgres about the size of table names.
* The name must be all lowercase since table names in Postgres are
* case insensitive and the relname is stored in lowercase. Unless some
***************
*** 577,583 ****
*
* Because of this, a Class name may not have _ in the name.
* Another limitation, is that the entire class name (including packages) ! * cannot be longer than 32 characters (a limit forced by PostgreSQL). * * @param name Class name * @return PostgreSQL table name --- 577,583 ---- * * Because of this, a Class name may not have _ in the name.
* Another limitation, is that the entire class name (including packages) ! * cannot be longer than 64 characters (a limit forced by PostgreSQL). * * @param name Class name * @return PostgreSQL table name *************** *** 590,605 **** if (name.indexOf("_") > -1) throw new PSQLException("postgresql.serial.underscore"); ! // Postgres table names can only be 32 character long. ! // Reserve 1 char, so allow only up to 31 chars. // If the full class name with package is too long // then just use the class name. If the class name is // too long throw an exception. // ! if ( name.length() > 31 ) { name = name.substring(name.lastIndexOf(".") + 1); ! if ( name.length() > 31 ) throw new PSQLException("postgresql.serial.namelength", name, new Integer(name.length())); } return name.replace('.', '_'); --- 590,605 ---- if (name.indexOf("_") > -1) throw new PSQLException("postgresql.serial.underscore"); ! // Postgres table names can only be 64 character long. ! // Reserve 1 char, so allow only up to 63 chars. // If the full class name with package is too long // then just use the class name. If the class name is // too long throw an exception. // ! if ( name.length() > 63 ) { name = name.substring(name.lastIndexOf(".") + 1); ! if ( name.length() > 63 ) throw new PSQLException("postgresql.serial.namelength", name, new Integer(name.length())); } return name.replace('.', '_'); Index: src/test/regress/expected/name.out =================================================================== RCS file: /cvsroot/pgsql-server/src/test/regress/expected/name.out,v retrieving revision 1.5 diff -c -r1.5 name.out *** src/test/regress/expected/name.out 4 Jan 2000 16:19:34 -0000 1.5 --- src/test/regress/expected/name.out 13 Aug 2002 20:18:04 -0000 *************** *** 19,104 **** -- -- CREATE TABLE NAME_TBL(f1 name); ! INSERT INTO NAME_TBL(f1) VALUES ('ABCDEFGHIJKLMNOP'); ! INSERT INTO NAME_TBL(f1) VALUES ('abcdefghijklmnop'); INSERT INTO NAME_TBL(f1) VALUES ('asdfghjkl;'); INSERT INTO NAME_TBL(f1) VALUES ('343f%2a'); INSERT INTO NAME_TBL(f1) VALUES ('d34aaasdf'); INSERT INTO NAME_TBL(f1) VALUES (''); ! INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'); SELECT '' AS seven, NAME_TBL.*; seven | f1 ! -------+--------------------------------- ! | ABCDEFGHIJKLMNOP ! | abcdefghijklmnop | asdfghjkl; | 343f%2a | d34aaasdf | ! | 1234567890ABCDEFGHIJKLMNOPQRSTU (7 rows) ! SELECT '' AS six, c.f1 FROM NAME_TBL c WHERE c.f1 <> 'ABCDEFGHIJKLMNOP'; six | f1 ! -----+--------------------------------- ! | abcdefghijklmnop | asdfghjkl; | 343f%2a | d34aaasdf | ! | 1234567890ABCDEFGHIJKLMNOPQRSTU ! (6 rows) ! SELECT '' AS one, c.f1 FROM NAME_TBL c WHERE c.f1 = 'ABCDEFGHIJKLMNOP'; one | f1 ! -----+------------------ ! | ABCDEFGHIJKLMNOP ! (1 row) ! SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 < 'ABCDEFGHIJKLMNOP'; three | f1 ! -------+--------------------------------- ! | 343f%2a | ! | 1234567890ABCDEFGHIJKLMNOPQRSTU ! (3 rows) ! SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 <= 'ABCDEFGHIJKLMNOP'; four | f1 ! ------+--------------------------------- ! | ABCDEFGHIJKLMNOP ! | 343f%2a | ! | 1234567890ABCDEFGHIJKLMNOPQRSTU ! (4 rows) ! SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 > 'ABCDEFGHIJKLMNOP'; three | f1 ! -------+------------------ ! | abcdefghijklmnop | asdfghjkl; | d34aaasdf ! (3 rows) ! SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 >= 'ABCDEFGHIJKLMNOP'; four | f1 ! ------+------------------ ! | ABCDEFGHIJKLMNOP ! | abcdefghijklmnop | asdfghjkl; | d34aaasdf ! (4 rows) SELECT '' AS seven, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*'; seven | f1 ! -------+--------------------------------- ! | ABCDEFGHIJKLMNOP ! | abcdefghijklmnop | asdfghjkl; | 343f%2a | d34aaasdf | ! | 1234567890ABCDEFGHIJKLMNOPQRSTU (7 rows) SELECT '' AS zero, c.f1 FROM NAME_TBL c WHERE c.f1 !~ '.*'; --- 19,104 ---- -- -- CREATE TABLE NAME_TBL(f1 name); ! INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'); ! INSERT INTO NAME_TBL(f1) VALUES ('1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr'); INSERT INTO NAME_TBL(f1) VALUES ('asdfghjkl;'); INSERT INTO NAME_TBL(f1) VALUES ('343f%2a'); INSERT INTO NAME_TBL(f1) VALUES ('d34aaasdf'); INSERT INTO NAME_TBL(f1) VALUES (''); ! INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'); SELECT '' AS seven, NAME_TBL.*; seven | f1 ! -------+----------------------------------------------------------------- ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ ! | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq | asdfghjkl; | 343f%2a | d34aaasdf | ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ (7 rows) ! SELECT '' AS six, c.f1 FROM NAME_TBL c WHERE c.f1 <> '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; six | f1 ! -----+----------------------------------------------------------------- ! | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq | asdfghjkl; | 343f%2a | d34aaasdf | ! (5 rows) ! SELECT '' AS one, c.f1 FROM NAME_TBL c WHERE c.f1 = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; one | f1 ! -----+----------------------------------------------------------------- ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ ! (2 rows) ! SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 < '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; three | f1 ! -------+---- | ! (1 row) ! SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 <= '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; four | f1 ! ------+----------------------------------------------------------------- ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ | ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ ! (3 rows) ! SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 > '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; three | f1 ! -------+----------------------------------------------------------------- ! | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq | asdfghjkl; + | 343f%2a | d34aaasdf ! (4 rows) ! SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 >= '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; four | f1 ! ------+----------------------------------------------------------------- ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ ! | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq | asdfghjkl; + | 343f%2a | d34aaasdf ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ ! (6 rows) SELECT '' AS seven, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*'; seven | f1 ! -------+----------------------------------------------------------------- ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ ! | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq | asdfghjkl; | 343f%2a | d34aaasdf | ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ (7 rows) SELECT '' AS zero, c.f1 FROM NAME_TBL c WHERE c.f1 !~ '.*'; *************** *** 108,118 **** SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '[0-9]'; three | f1 ! -------+--------------------------------- | 343f%2a | d34aaasdf ! | 1234567890ABCDEFGHIJKLMNOPQRSTU ! (3 rows) SELECT '' AS two, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*asdf.*'; two | f1 --- 108,120 ---- SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '[0-9]'; three | f1 ! -------+----------------------------------------------------------------- ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ ! | 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopq | 343f%2a | d34aaasdf ! | 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQ ! (5 rows) SELECT '' AS two, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*asdf.*'; two | f1 Index: src/test/regress/sql/name.sql =================================================================== RCS file: /cvsroot/pgsql-server/src/test/regress/sql/name.sql,v retrieving revision 1.5 diff -c -r1.5 name.sql *** src/test/regress/sql/name.sql 4 Jan 2000 16:21:02 -0000 1.5 --- src/test/regress/sql/name.sql 13 Aug 2002 20:18:04 -0000 *************** *** 14,22 **** CREATE TABLE NAME_TBL(f1 name); ! INSERT INTO NAME_TBL(f1) VALUES ('ABCDEFGHIJKLMNOP'); ! INSERT INTO NAME_TBL(f1) VALUES ('abcdefghijklmnop'); INSERT INTO NAME_TBL(f1) VALUES ('asdfghjkl;'); --- 14,22 ---- CREATE TABLE NAME_TBL(f1 name); ! INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'); ! INSERT INTO NAME_TBL(f1) VALUES ('1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr'); INSERT INTO NAME_TBL(f1) VALUES ('asdfghjkl;'); *************** *** 26,47 **** INSERT INTO NAME_TBL(f1) VALUES (''); ! INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'); SELECT '' AS seven, NAME_TBL.*; ! SELECT '' AS six, c.f1 FROM NAME_TBL c WHERE c.f1 <> 'ABCDEFGHIJKLMNOP'; ! SELECT '' AS one, c.f1 FROM NAME_TBL c WHERE c.f1 = 'ABCDEFGHIJKLMNOP'; ! SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 < 'ABCDEFGHIJKLMNOP'; ! SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 <= 'ABCDEFGHIJKLMNOP'; ! SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 > 'ABCDEFGHIJKLMNOP'; ! SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 >= 'ABCDEFGHIJKLMNOP'; SELECT '' AS seven, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*'; --- 26,47 ---- INSERT INTO NAME_TBL(f1) VALUES (''); ! INSERT INTO NAME_TBL(f1) VALUES ('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ'); SELECT '' AS seven, NAME_TBL.*; ! SELECT '' AS six, c.f1 FROM NAME_TBL c WHERE c.f1 <> '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; ! SELECT '' AS one, c.f1 FROM NAME_TBL c WHERE c.f1 = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; ! SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 < '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; ! SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 <= '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; ! SELECT '' AS three, c.f1 FROM NAME_TBL c WHERE c.f1 > '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; ! SELECT '' AS four, c.f1 FROM NAME_TBL c WHERE c.f1 >= '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCDEFGHIJKLMNOPQR'; SELECT '' AS seven, c.f1 FROM NAME_TBL c WHERE c.f1 ~ '.*';
- The class name must be less than 64 chars long and must be all lowercase.
* This is due to limitations in Postgres about the size of table names.
* The name must be all lowercase since table names in Postgres are
* case insensitive and the relname is stored in lowercase. Unless some
***************
*** 577,583 ****
*
* Because of this, a Class name may not have _ in the name.
Re: FUNC_MAX_ARGS benchmarks
Joe Conway wrote: > Bruce Momjian wrote: > >> As long as we allocate the full length for the funcarg and name types, >> we are going to have performance/space issues with increasing them, >> especially since we are looking at doubling or quadrupling those values. >> >> You can say that the test below isn't a representative benchmark, but I >> am sure it is typical of _some_ of our users, so it may still be a >> significant test. We don't get good benchmark numbers by accident. It >> is this type of analysis that keeps us sharp. > > > I'm running the OSDB benchmark right now. So far the Single user test > results are done, and the overall results is like this: > > NAMEDATALEN = 32, FUNC_MAX_ARGS = 32 > "Single User Test" 2205.89 seconds (0:36:45.89) > > NAMEDATALEN = 128, FUNC_MAX_ARGS = 32 > "Single User Test" 2256.16 seconds (0:37:36.16) > > So the difference in performance for this benchmark is not nearly so > large, more like 2%. The multi-user portion of the second test is > running right now, so I'll report final results in the morning. I might > also run this on the same machine against 7.2.1 to see where we would > stand in comparison to the last release. But that won't happen until > tomorrow some time. > Here's the multi-user test summary. Very little difference. The details of the OSDB output are attached. NAMEDATALEN = 32, FUNC_MAX_ARGS = 32 "Multi-User Test" 3403.84 seconds (0:56:43.84) NAMEDATALEN = 128, FUNC_MAX_ARGS = 32 "Multi-User Test" 3412.18 seconds (0:56:52.18) Joe
Re: FUNC_MAX_ARGS benchmarks
Peter Eisentraut wrote: > Joe Conway writes: >>Here's the multi-user test summary. Very little difference. The details >>of the OSDB output are attached. > > The fact that the OSDB benchmark has just about the least possible test > coverage of identifier handling and you still get a 2% performance drop is > something I'm concerned about. > Of course that's on the single user test only. In the multi-user test the two are neck-and-neck. If you really want to be concerned, see the attached. This lines up results from: REL7_2_STABLE with NAMEDATALEN = 32 and FUNC_MAX_ARGS = 16 7.3devel with NAMEDATALEN = 32 and FUNC_MAX_ARGS = 32 7.3devel with NAMEDATALEN = 128 and FUNC_MAX_ARGS = 32 In the single-user test, REL7_2_STABLE is best by about 10%. But in the multi-user test (10 users), *both* 7.3devel tests are about 3.5% faster than 7.2. Joe