[ulogd2] Flat SQL schema for MySQL

Eric Leblond netfilter-cvslog-bounces at lists.netfilter.org
Wed Jan 7 00:24:03 CET 2009


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=ulogd2.git;a=commit;h=543d973caed160cfc301ab636aa33412aac67d79
commit 543d973caed160cfc301ab636aa33412aac67d79
Author:     Pierre Chifflier <chifflier at inl.fr>
AuthorDate: Tue Jan 6 23:31:17 2009 +0100
Commit:     Eric Leblond <eric at inl.fr>
CommitDate: Wed Jan 7 00:15:51 2009 +0100

    Flat SQL schema for MySQL
    
    This schema is designed for performance, by putting all fields in a
    single table. It should be used in combination with plain INSERT.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

commit d61c97834fa53fff396a2eb06ad019bf84d82491
Author:     Pierre Chifflier <chifflier at inl.fr>
AuthorDate: Tue Jan 6 23:31:16 2009 +0100
Commit:     Eric Leblond <eric at inl.fr>
CommitDate: Wed Jan 7 00:15:51 2009 +0100

    Flat SQL schema for PostgreSQL
    
    This schema is designed for performance, by putting all fields in a
    single table. It should be used in combination with plain INSERT.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

commit 668651378314023194734a70bd4b4d641797e824
Author:     Pierre Chifflier <chifflier at inl.fr>
AuthorDate: Tue Jan 6 23:31:13 2009 +0100
Commit:     Eric Leblond <eric at inl.fr>
CommitDate: Wed Jan 7 00:15:41 2009 +0100

    PostgreSQL: allow local connections
    
    This patch allows to connect to the server using the local (unix) socket,
    thus not using a network socket and SSL encryption.
    Local connection is used if host parameter is omitted or empty.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

commit fef9e7c57b003d934ec31acfefe451c5dd45e760
Author:     Pierre Chifflier <chifflier at inl.fr>
AuthorDate: Tue Jan 6 23:31:18 2009 +0100
Commit:     Eric Leblond <eric at inl.fr>
CommitDate: Wed Jan 7 00:14:20 2009 +0100

    DBI: lower column name before comparing to key
    
    Some databases (e.g Oracle) return column name in uppercase, while
    key name is in lowercase. This patch allows to match keys correctly.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

commit acc52090393384c8e8d1994b32363895d5afb371
Author:     Pierre Chifflier <chifflier at inl.fr>
AuthorDate: Tue Jan 6 23:31:14 2009 +0100
Commit:     Eric Leblond <eric at inl.fr>
CommitDate: Wed Jan 7 00:12:56 2009 +0100

    Allow plain INSERT instead of procedure
    
    If the procedure name specified in configuration is INSERT, than use
    a regular insertion instead of a stored procedure.
    This should be used when performance is needed, with a flat SQL schema,
    to reduce the cost of SQL procedure calls.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

commit 916becab13907a64a1901d228390cedc79673e7f
Author:     Pierre Chifflier <chifflier at inl.fr>
AuthorDate: Tue Jan 6 23:31:15 2009 +0100
Commit:     Eric Leblond <eric at inl.fr>
CommitDate: Wed Jan 7 00:10:41 2009 +0100

    PostgreSQL schema: drop useless constraints
    
    Constraints on TCP/UDP port number validity are useless and only slow
    down insertions.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>
       via  543d973caed160cfc301ab636aa33412aac67d79 (commit)
       via  d61c97834fa53fff396a2eb06ad019bf84d82491 (commit)
       via  668651378314023194734a70bd4b4d641797e824 (commit)
       via  fef9e7c57b003d934ec31acfefe451c5dd45e760 (commit)
       via  acc52090393384c8e8d1994b32363895d5afb371 (commit)
       via  916becab13907a64a1901d228390cedc79673e7f (commit)
      from  6bcbe0e967b1339c308d4e14d027b562ff179f7d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 543d973caed160cfc301ab636aa33412aac67d79
Author: Pierre Chifflier <chifflier at inl.fr>
Date:   Tue Jan 6 23:31:17 2009 +0100

    Flat SQL schema for MySQL
    
    This schema is designed for performance, by putting all fields in a
    single table. It should be used in combination with plain INSERT.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

commit d61c97834fa53fff396a2eb06ad019bf84d82491
Author: Pierre Chifflier <chifflier at inl.fr>
Date:   Tue Jan 6 23:31:16 2009 +0100

    Flat SQL schema for PostgreSQL
    
    This schema is designed for performance, by putting all fields in a
    single table. It should be used in combination with plain INSERT.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

commit 668651378314023194734a70bd4b4d641797e824
Author: Pierre Chifflier <chifflier at inl.fr>
Date:   Tue Jan 6 23:31:13 2009 +0100

    PostgreSQL: allow local connections
    
    This patch allows to connect to the server using the local (unix) socket,
    thus not using a network socket and SSL encryption.
    Local connection is used if host parameter is omitted or empty.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

commit fef9e7c57b003d934ec31acfefe451c5dd45e760
Author: Pierre Chifflier <chifflier at inl.fr>
Date:   Tue Jan 6 23:31:18 2009 +0100

    DBI: lower column name before comparing to key
    
    Some databases (e.g Oracle) return column name in uppercase, while
    key name is in lowercase. This patch allows to match keys correctly.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

commit acc52090393384c8e8d1994b32363895d5afb371
Author: Pierre Chifflier <chifflier at inl.fr>
Date:   Tue Jan 6 23:31:14 2009 +0100

    Allow plain INSERT instead of procedure
    
    If the procedure name specified in configuration is INSERT, than use
    a regular insertion instead of a stored procedure.
    This should be used when performance is needed, with a flat SQL schema,
    to reduce the cost of SQL procedure calls.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

commit 916becab13907a64a1901d228390cedc79673e7f
Author: Pierre Chifflier <chifflier at inl.fr>
Date:   Tue Jan 6 23:31:15 2009 +0100

    PostgreSQL schema: drop useless constraints
    
    Constraints on TCP/UDP port number validity are useless and only slow
    down insertions.
    
    Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

-----------------------------------------------------------------------

 doc/mysql-ulogd2-flat.sql         |  478 +++++++++++++++++++++++++++++++++++++
 doc/pgsql-ulogd2-flat.sql         |  406 +++++++++++++++++++++++++++++++
 doc/pgsql-ulogd2.sql              |    5 -
 output/dbi/ulogd_output_DBI.c     |   14 +
 output/pgsql/ulogd_output_PGSQL.c |    3 +-
 util/db.c                         |   27 ++-
 6 files changed, 926 insertions(+), 7 deletions(-)
 create mode 100644 doc/mysql-ulogd2-flat.sql
 create mode 100644 doc/pgsql-ulogd2-flat.sql
Constraints on TCP/UDP port number validity are useless and only slow
down insertions.

Signed-off-by: Pierre Chifflier <chifflier at inl.fr>

diff --git a/doc/pgsql-ulogd2.sql b/doc/pgsql-ulogd2.sql
index 73e038d..da66c85 100644
--- a/doc/pgsql-ulogd2.sql
+++ b/doc/pgsql-ulogd2.sql
@@ -278,11 +278,6 @@ CREATE INDEX ulog2_ct_reply_l4_sport ON ulog2_ct(reply_l4_sport);
 CREATE INDEX ulog2_ct_reply_l4_dport ON ulog2_ct(reply_l4_dport);
 CREATE INDEX ulog2_ct_event ON ulog2_ct(ct_event);
 
-ALTER TABLE ulog2_ct ADD CONSTRAINT orig_l4_sport CHECK(orig_l4_sport >= 0 AND orig_l4_sport <= 65536);
-ALTER TABLE ulog2_ct ADD CONSTRAINT orig_l4_dport CHECK(orig_l4_dport >= 0 AND orig_l4_dport <= 65536);
-ALTER TABLE ulog2_ct ADD CONSTRAINT reply_l4_sport CHECK(reply_l4_sport >= 0 AND reply_l4_sport <= 65536);
-ALTER TABLE ulog2_ct ADD CONSTRAINT reply_l4_dport CHECK(reply_l4_dport >= 0 AND reply_l4_dport <= 65536);
-
 -- 
 -- Helper table
 -- 



More information about the netfilter-cvslog mailing list