Re: SELECT Takes Long Time to Execute]
Posted in 1998
This is a multi-part message in MIME format.
--------------7721CFBE072DE7C59CF33287
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
1) did you try another driver instead? (i.e. ODBC) If it works try to
change your
driver. If not, something wrong on your client application.
2) What are the Index structure of this table? Its a simple SQL
statement and I
think sloweleness is mostly depend on the indexes of this table. i.e try
to add
index for this column (if you really need speed on this query. Because
generally
adding index to this kind of fields is not advised)
3) May be informix chooses wrong query plan. Try SET EXPLAIN ON before
both on
application and server query. And check sqlexpln.out file to see what is
happening
during your query execution.
Gursoy YERLI.
Rajendra Singh wrote:
> I have a PB 6 application that I wrote. It uses the native Informix
driver to
> connect to an Informix SE database running on HP-UX 9.07. Under Win
95 and Win
> NT, there's a simple SELECT statement like the following:
>
> SELECT a INTO :hosta FROM table WHERE col = value;
>
> "col" is a column defined as char(12) in Informix.
>
> The problem I am having is that the SELECT takes a long time to
execute. If I
> execute the same statement in another PB program or on the Informix
server, the
> result set is returned almost immediately.
>
> Does anyone know why this is happening? Are there any suggestions?
>
--------------7721CFBE072DE7C59CF33287
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-ID: <35EFF1D8.272B85AC@ata.net>
Date: Fri, 04 Sep 1998 08:57:44 -0500
From: Gursoy YERLI <gursoy@ata.net>
X-Mailer: Mozilla 4.03 [en] (WinNT; U)
MIME-Version: 1.0
To: Rajendra Singh <rajsingh@hotmail.com>
Subject: Re: PB6: SELECT Takes Long Time to Execute
References: <19980904135335.25432.qmail@hotmail.com>
Content-Type: text/plain; charset=iso-8859-9
Content-Transfer-Encoding: 7bit
On which version of Informix Database server you are running
Gursoy YERLI
Rajendra Singh wrote:
> Hi,
>
> There is an index on the column that I am using in the SELECT (see
> below). I tried your suggestion and used "SET EXPLAIN". When I look at
> the output generated by SET EXPLAIN it says that a SEQUENTIAL SCAN is
> being done, even though there's an index on the column. When I run SET
> EXPLAIN and the same SELECT statement using dbaccess (on the server), it
> says INDEX PATH. Why is this happening?
>
> >Date: Thu, 03 Sep 1998 13:36:37 -0500
> >From: Gursoy YERLI <gursoy@ata.net>
> >To: rajsingh@hotmail.com
> >Subject: Re: PB6: SELECT Takes Long Time to Execute
> >
> >
> >
> >Rajendra Singh wrote:
> >
> >> I have a PB 6 application that I wrote. It uses the native Informix
> driver to
> >> connect to an Informix SE database running on HP-UX 9.07. Under Win
> 95 and Win
> >> NT, there's a simple SELECT statement like the following:
> >>
> >> SELECT a INTO :hosta FROM table WHERE col = value;
> >>
> >> "col" is a column defined as char(12) in Informix.
> >>
> >> The problem I am having is that the SELECT takes a long time to
> execute. If I
> >> execute the same statement in another PB program or on the Informix
> server, the
> >> result set is returned almost immediately.
> >>
> >> Does anyone know why this is happening? Are there any suggestions?
> >>
> >
> >1) did you try another driver instead? (i.e. ODBC) If it works try to
> change your
> >driver. If not, something wrong on your client application.
> >
> >2) What are the Index structure of this table? Its a simple SQL
> statement and I
> >think sloweleness is mostly depend on the indexes of this table. i.e
> try to add
> >index for this column (if you really need speed on this query. Because
> generally
> >adding index to this kind of fields is not advised)
> >
> >3) May be informix chooses wrong query plan. Try SET EXPLAIN ON before
> both on
> >application and server query. And check sqlexpln.out file to see what
> is happening
> >during your query execution.
> >
> >Gursoy YERLI.
> >
> >
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
--------------7721CFBE072DE7C59CF33287--