Oracle cursor help

2005-06-23 Thread Steve Sapovits
I have a few Oracle tables that have gotten way too big. Normal DELETE/WHERE clauses consume too many resources. I know enough to know that cursors would be more efficient here but I don't know enough to actually start using them. Does anyone have an example or two (or three) to bootstrap me?

ODBC and tables 'v' views

2005-06-23 Thread Ron Savage
Hi Folks Sorry if you've seen this, but I did not receive a copy. (This is under WinXP, with a DSN pointing to an MS Access db). Is there an ODBC function call, or anything, which will distinguish between tables and views? I looked at DBI::Const::GetInfo::ODBC, and tried $dbh - get_info(19)

RE: [dbi] ODBC and tables 'v' views

2005-06-23 Thread Martin J. Evans
The last two arguments to SQLTables can take a string containing the types you want: SQLTables(stmt_handle, NULL, 0, /* no specific catalog */ NULL, 0, /* no specific schema */ NULL, 0, /* no specific table */ NULL, 0) /* no specific type - table

Re: Oracle cursor help

2005-06-23 Thread Dr. Frank Ullrich
Steve, maybe this whole thing doesn't really belong here but anyway: Steve Sapovits wrote: I have a few Oracle tables that have gotten way too big. Normal DELETE/WHERE clauses consume too many resources. I know enough to know that cursors would be more efficient here but I don't How do

Re: DBD::Oracle make test fails, undefined symbol: ociepgoe, oracle client 8.0.5

2005-06-23 Thread Tim Bunce
On Wed, Jun 22, 2005 at 05:27:28PM -0700, Jesse Molina wrote: Greetings I am having difficulty making and make testing DBD::Oracle. Attached are files with detailed info which is asked for in the README file. Hopefully the listserver will accept them. My Oracle client is 8.0.5. I

Re: Oracle cursor help

2005-06-23 Thread Job Miller
Steve, Delete from table where will be much much more efficient than anything involving a cursor and a where current of clause to delete the row you are iterating over the cursor. think about what delete does. it identifies only the rows that need to be deleted, and deletes them in

RE: [dbi] Re: Attempt to initiate a new SQL Server operation with results pending.

2005-06-23 Thread Martin J. Evans
Daniel, On 22-Jun-2005 Daniel Kasak wrote: Martin J. Evans wrote: As far as I am aware this is a limitation of the TDS protocol used and your example code will not work unless you force a server-side cursor (see DBD::ODBC pod and look for odbc_SQL_ROWSET_SIZE but I warn you that you really

RE: Oracle cursor help

2005-06-23 Thread Vergara, Michael \(TEM\)
Steve: I have a PL/SQL process that I use to purge rows from a table that grows by about 14M rows/month. Even though it's PL/SQL, the process should be (might be?) transportable to Perl. Basically, it looks like this: Define SQL statement to gather the rows (PL/SQL cursor); ctr = 0; For each

Re: Oracle cursor help

2005-06-23 Thread Martin Hall
Well, I have to echo what others have said. The only reason I can think of for using loops to do your delete is if you really want to save a chunk of rollback segment. Even then, I would consider batching the rows up into chunks that you could manage with predicates like BETWEEN or IN.

Re: Oracle cursor help

2005-06-23 Thread jeff
dittoand I'd add that if your delete is taking forever to run that you may want to consider getting some indexes on the columns you are using to filter for your delete. If a select * from myTable where insert your predicate here takes a long time, then so will a delete with the same

Re: Oracle cursor help

2005-06-23 Thread Job Miller
Size your rollback so you can do this in one transaction. DECLARE CURSOR T1 IS SELECT e, f FROM T1 WHERE e f FOR UPDATE; BEGIN OPEN T1Cursor; LOOP /* Retrieve each row of the result of the above query into PL/SQL

Re: Oracle cursor help - retry

2005-06-23 Thread Job Miller
sorry for the earlier aborted message. yahoo mail mysteriously sends messages while I am still typing sometimes. some magic key I hit on my laptop submits the form. I was including a sample of where current of but before that: 1. Size Rollback for non-incremental commits 2. Don't do Manual

Re: DBD::Oracle make test fails, undefined symbol: ociepgoe, oracle client 8.0.5

2005-06-23 Thread Jesse Molina
Hi Tim Thanks for your reply. Sorry if I was not clear, but I had already tried your suggestion and it did not work. Specifically, in the Makefile.PL, I did; [EMAIL PROTECTED]diff Makefile.PL Makefile.PL.original 287c287 $opts{LIBS} = [ -L$OH/$libdir -lextp -l$lib $syslibs ]; ---

Version 1.43 of DBD::Pg released

2005-06-23 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Version 1.43 of DBD::Pg, the Perl DBI interface to PostgreSQL, has just been released. This version mostly fixes some bugs that appeared in 1.41 and 1.42, as well as introducing a new file, README.dev, to help developers of this module. The module

Re: Oracle schema comparison

2005-06-23 Thread John Watson
check out TOYS (Tool for Organizing Your Schemas) http://www.impacttoys.com John Watson Steve Sapovits [EMAIL PROTECTED] 06/16/05 11:11AM Does anybody know of any good tools (free or otherwise) for comparing two Oracle schemas? I'd want to be able to compare tables, indices, sequences, etc.

Re: [cgiapp] Re: positional plugin ordering

2005-06-23 Thread Ron Savage
On Thu, 23 Jun 2005 11:49:01 -0400, Cees Hek wrote: Hi Cees I think that if we want complete control over ordering (ie maximal I just love this phrase! Nothing personal, Cees, I assure you. A lot of the problems uncovered in this discussion are due to attempts to use code to solve the wrong