RE: [SQL] primary key scans in sequence

2001-05-31 Thread Gerald Gutierrez
I think you're just witnessing the optimizer at work. If it thinks that doing sequential scans is faster, it will ignore the indices. At 11:03 AM 5/31/2001 +0200, Koen Antonissen wrote: >Thing I descovered after i posted to the group was that after creating >the scheme again, the indexes are us

[SQL] Date manipulation

2001-05-31 Thread Mark
How does one perform date manipulation within SQL? For example, SQL Server has a dateadd() function that takes a date part, scalar, and the date to manipulate. I have a query that determines the number of days that are between now and a particular date that looks something like this: select da

Re: [SQL] 7.1.1 Lock Problems on Views

2001-05-31 Thread Brian Powell
On Thursday, May 31, 2001, at 10:42 AM, Tom Lane wrote: > Why don't you redesign the app to not use table-level locks? > An MVCC-aware app should have little or no need for table-level > locking. > Thanks, I'll read up on MVCC in the docs. While digging around, I came across the MVCC and it w

Re: [SQL] 7.1.1 Lock Problems on Views

2001-05-31 Thread Tom Lane
Brian Powell <[EMAIL PROTECTED]> writes: > In our client app, we lock our table before doing something to it. Why don't you redesign the app to not use table-level locks? An MVCC-aware app should have little or no need for table-level locking. Locking views strikes me as a pretty fragile, if n

[SQL] Re: rowset Return from postgresql

2001-05-31 Thread Josh Berkus
AKM, > I know you have an workaround idea to retrieve rowset (Resultset > in > JDBC) from PostGres function call in 7.1. I was looking at mailing > archive > to find but was not successful. If you please help me out stating > your > ideas, I will appreciate that. I can understand that. The

RE: [SQL] primary key scans in sequence

2001-05-31 Thread Stephan Szabo
It really depends on the number of rows. If the number of rows in the tables are small or the number of rows returned is a reasonable percentage, the index scan is currently more expensive. What does (for example) select count(*) from classes; give? On Thu, 31 May 2001, Koen Antonissen wrote:

[SQL] 7.1.1 Lock Problems on Views

2001-05-31 Thread Brian Powell
Greetings, I am investigating whether our application will run on 7.1.1 (from 7.0.3), and our client software only accesses the database through views for security and convenience. In our client app, we lock our table before doing something to it. Fortunately, in 7.0.3, a view looked like a

[SQL] question about PL/pgSQL function

2001-05-31 Thread datactrl
With postgres 7.1 1. Function like example found on 24.4 Example in Programmer Guide CREATE FUNCTION xxx (EMP, integer) RETURNS boolean AS'.. (which EMP is a table ) How do I pass a record to this function in PL/PGSQL? I try this select into rec1 * from EMP where empNo =''

RE: [SQL] primary key scans in sequence

2001-05-31 Thread Koen Antonissen
actually the serials are declared int4 (integer), I tried to use your work around anyway, but it didn't work...: dsc_competition=# \d classes Table "classes" Attribute | Type | Modifier +-+