what settings can effect results of SELECT SQL

what settings can effect results of SELECT SQL

Post by Chip Orang » Wed, 10 Oct 2001 04:01:56



We have a situation where two different programmers are issuing the same
SELECT SQL command in their apps and coming up with different results;
besides SET ANSI and SET EXACT are there other settings which might effect
the results of SELECT SQL?

TIA,

Chip Orange

 
 
 

what settings can effect results of SELECT SQL

Post by Craig Berntso » Wed, 10 Oct 2001 09:43:06


SET DELETED

--

Craig Berntson
VFP MVP, MCSD
Salt Lake City Fox User Group
www.craigberntson.com


Quote:> We have a situation where two different programmers are issuing the same
> SELECT SQL command in their apps and coming up with different results;
> besides SET ANSI and SET EXACT are there other settings which might effect
> the results of SELECT SQL?

> TIA,

> Chip Orange


 
 
 

what settings can effect results of SELECT SQL

Post by Anders Altber » Wed, 10 Oct 2001 10:44:09


SET EXACT doesn't affect the evaluation of search conditions in SQL queries,
only in xbase code.
Buffering may be set differently by different users - one may have the
tables buffered
-Anders


Quote:> We have a situation where two different programmers are issuing the same
> SELECT SQL command in their apps and coming up with different results;
> besides SET ANSI and SET EXACT are there other settings which might effect
> the results of SELECT SQL?

> TIA,

> Chip Orange

 
 
 

1. Bad side-effect from making EXPLAIN return a select result

In 7.2 and before it would work to do EXPLAIN in a plpgsql function:

regression=# create function foo(int) returns int as '
regression'# begin
regression'# explain select * from tenk1 where unique1  = $1;
regression'# return 1;
regression'# end;' language plpgsql;
CREATE
regression=# select foo(1);
NOTICE:  QUERY PLAN:

Index Scan using tenk1_unique1 on tenk1  (cost=0.00..6.00 rows=1 width=148)

 foo
-----
   1
(1 row)

which was useful for examining the behavior of the planner with
parameterized queries.

In current CVS tip this doesn't work anymore --- the EXPLAIN executes
just fine, but plpgsql discards the result, and you never get to see it.

Not sure what to do about this.  Probably plpgsql should be tweaked to
do something with EXPLAIN, but what?  Should it treat it like a SELECT?
Or just issue the output as a NOTICE (seems like a step backwards
though).

I'm also strongly tempted to try to make the SQL-language equivalent work:

regression=# create function foo(int) returns setof text as
regression-# 'explain select * from tenk1 where unique1  = $1;'
regression-# language sql;
ERROR:  function declared to return text, but final statement is not a SELECT

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

2. DTS Help Needed

3. Effect of dynamic SQL in SP on resulting performance

4. Problem attaching a db with vb6

5. international setting for bcp no effect

6. creating create script like in query analyzer

7. Boot.ini /3GB setting no effect

8. OleDbDataReader.GetDataTypeName method??

9. Changed settings in the Configure Manage will not take effect

10. setting the ConnectionTimeout to zero has no effect

11. BDE Admin settings have no effect (Paradox tables)

12. Setting arraysize in sqlplus has no effect?

13. Effect of setting system date ahead???