[GENERAL] ODBC
PostgreSQL I am using Microsoft Visual FoxPro to connect VIA ODBC using both a DSN connection and a DSNLess Connection. The DSNLess connection is Wy... slower than the DSN connection and I am having a problem trying to figure out what ODBC settings affect performance this much. using DSN i can pull 4 fields x 953 rows in .266 seconds :) however using a DSNLess connection the same query takes >179 seconds (ouch =-O) the DSN connection settings are all the default expet for Database = systemdata Server = 192.168.10.94 Username = postgres I have been messing around with the DSNLess connection and have tried changing quite a few of the setting but can't get the speed up, here are some of the settings. As you can see they are pretty much the same. lcSqlDriverName= "PostgreSQL" lcSqlServerName="192.168.10.94" lcSqlDatabase="systemdata"" lcSqlUserName="postgres" lcSqlPassword="" lcSqlPort="5432" lcSqFetch="100" lcSqOptimizer="1" lcSqKsqo="1" lcSqSqUniqueIndex = "1" lcSqBoolsAsChar = "1" lcSqMaxVarcharSize = "254" lcSqMaxLongVarcharSize = "8190" lcSqExtraSysTablePrefixes = "dd_;" lcSqProtocol = "6.4" lcSqUpdatableCursors = "1" lcSqLFConversion = "1" thanks.. -- Eugene Vital Any technology indistinguishable from magic is insufficiently advanced. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [GENERAL] Pgsql on Windows
Matthew T. O'Connor wrote: I don't see how ODBC fits in to this at all. There is no need for ODBC if postgresql is running via cygwin, running on a remote linux box, or even native on windows. I am new to PostgreSQL what other options are available to connect then ? -- Eugene Vital Any technology indistinguishable from magic is insufficiently advanced. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] Parent Id
ok, I am new to Postgres so could you give a little better explanation of this ?? I haven't created any sequence for this I am just using a type serial field. will I have to create a sequence for it? Here is my code to create the tables CREATE TABLE workstations (station_id INT4 PRIMARY KEY, name VARCHAR(50), description VARCHAR(250)) CREATE TABLE wsoptions (option_id SERIAL PRIMARY KEY, station_id INT4 REFERENCES workstations (station_id) ON DELETE CASCADE, type VARCHAR(20), data TEXT) insert into workstations (name, description) values("new", "This is a test") insert into wsoptions (stations_id, type, data) values( , "LOCATION", "10th floor outer, office 27") thanks Bruno Wolff III wrote: On Thu, Oct 09, 2003 at 15:55:27 -0400, Gene Vital <[EMAIL PROTECTED]> wrote: have an example :) Bruno Wolff III wrote: On Thu, Oct 09, 2003 at 14:26:21 -0400, Gene Vital <[EMAIL PROTECTED]> wrote: when inserting new records into parent / child tables, what is the best recommended way of retrieving the pkey value from the parent table when using auto incrementing fields ? You want to use currval. currval will return the last value obtained by nextval in the same session, so it is safe to use without any additional locking. You would do something like: insert into parent_table (pk, col1, col2) values (default, 'val1', 'val2'); insert into child_table (pk, parent, col1, col2) values (default, currval('parent_table_pk_seq'), 'val3', 'val4'); I don't remember when being able to use default in insert statements was added. You may need to just leave the pk columns off the list. I added them so that you could see what the normal sequence name looks like. I also assume that the two pk columns are declared to be of type serial. If not, then you have to do the sequence and default creation yourself. -- Eugene Vital Any technology indistinguishable from magic is insufficiently advanced. ---(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
[GENERAL] updating records
Hi all. I am using Visual FoxPro via ODBC to update records on a 7.3.4 PostgreSql server and it appears that it always uses delete/insert instead of updating the current record. Can this be changed to update the existing record instead? -- Eugene Vital Any technology indistinguishable from magic is insufficiently advanced. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html