Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Terrible slow SQL

4 posts in PHP Last posting was on 2008-04-14 15:26:44.0Z
Corina Posted on 2008-04-09 11:34:53.0Z
Reply-To: "Corina" <corina.strejcek@itsdone.at>
From: "Corina" <corina.strejcek@itsdone.at>
Newsgroups: Advantage.PHP
Subject: Terrible slow SQL
Date: Wed, 9 Apr 2008 13:34:53 +0200
Lines: 20
Organization: Itsdone
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 91.114.8.210
Message-ID: <47fcae22@solutions.advantagedatabase.com>
X-Trace: 9 Apr 2008 05:53:06 -0700, 91.114.8.210
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!91.114.8.210
Xref: solutions.advantagedatabase.com Advantage.PHP:877
Article PK: 1135361

Hello,

I am trying to make 30.000 inserts into my Advantage Database. The problem
is ...it works, but it's damn slow.
It takes about 3 hours for these 30.000 inserts to execute. My code looks
something like this:

//all inserts in one string
$sql = "INSERT INTO \"$db\" (ID,Kundennummer,Identnr,Lotterie,Passwort)
VALUES ($line,$Knr,$Inr,$Lott,'$Pwd'); INSERT INTO ....

//execute
$result=ads_exec($ads_hobr,$sql);

Is there a way to increase the performance, I thought that it would work
faster with those PHP-Extensions


Edgar Sherman Posted on 2008-04-11 21:08:42.0Z
Date: Fri, 11 Apr 2008 15:08:42 -0600
From: Edgar Sherman <no@email.com>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: Advantage.PHP
Subject: Re: Terrible slow SQL
References: <47fcae22@solutions.advantagedatabase.com>
In-Reply-To: <47fcae22@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.24.34.164
Message-ID: <47ffd1fb@solutions.advantagedatabase.com>
X-Trace: 11 Apr 2008 15:02:51 -0700, 10.24.34.164
Lines: 28
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.34.164
Xref: solutions.advantagedatabase.com Advantage.PHP:880
Article PK: 1135364

Are you using Local Server or Remote server? Any Triggers or are you in
a Transaction?

How about in ARC, Do the 30,000 insert take the same time?

Edgar Sherman

Corina wrote:
> Hello,
>
> I am trying to make 30.000 inserts into my Advantage Database. The problem
> is ...it works, but it's damn slow.
> It takes about 3 hours for these 30.000 inserts to execute. My code looks
> something like this:
>
> //all inserts in one string
> $sql = "INSERT INTO \"$db\" (ID,Kundennummer,Identnr,Lotterie,Passwort)
> VALUES ($line,$Knr,$Inr,$Lott,'$Pwd'); INSERT INTO ....
>
> //execute
> $result=ads_exec($ads_hobr,$sql);
>
> Is there a way to increase the performance, I thought that it would work
> faster with those PHP-Extensions
>
>
>
>


Corina Posted on 2008-04-14 10:56:08.0Z
Reply-To: "Corina" <corina.strejcek@itsdone.at>
From: "Corina" <corina.strejcek@itsdone.at>
Newsgroups: Advantage.PHP
References: <47fcae22@solutions.advantagedatabase.com> <47ffd1fb@solutions.advantagedatabase.com>
Subject: Re: Terrible slow SQL
Date: Mon, 14 Apr 2008 12:56:08 +0200
Lines: 42
Organization: Itsdone
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 91.114.8.210
Message-ID: <480336f5@solutions.advantagedatabase.com>
X-Trace: 14 Apr 2008 04:50:29 -0700, 91.114.8.210
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!91.114.8.210
Xref: solutions.advantagedatabase.com Advantage.PHP:882
Article PK: 1135366

Remote Server - No trigger
In Advantage Data Architect I do the same process --> it takes about 3
minutes
Now I wanted to automate the process in PHP, but I don't know how to get the
same performance.
I heard that PHP is slower in general, but 3 hours ???
Has anybode else had problems with bad performance in php?
I have to admit that I am no Sybase-Pro (ant neither a database-Pro) and I
REALLY have NO CLUE how to make this script faster! Are there some "tricks"
for improving the performance?

"Edgar Sherman" <no@email.com> schrieb im Newsbeitrag
news:47ffd1fb@solutions.advantagedatabase.com...

> Are you using Local Server or Remote server? Any Triggers or are you in a
> Transaction?
>
> How about in ARC, Do the 30,000 insert take the same time?
>
> Edgar Sherman
>
> Corina wrote:
>> Hello,
>>
>> I am trying to make 30.000 inserts into my Advantage Database. The
>> problem
>> is ...it works, but it's damn slow.
>> It takes about 3 hours for these 30.000 inserts to execute. My code looks
>> something like this:
>>
>> //all inserts in one string
>> $sql = "INSERT INTO \"$db\" (ID,Kundennummer,Identnr,Lotterie,Passwort)
>> VALUES ($line,$Knr,$Inr,$Lott,'$Pwd'); INSERT INTO ....
>>
>> //execute
>> $result=ads_exec($ads_hobr,$sql);
>>
>> Is there a way to increase the performance, I thought that it would work
>> faster with those PHP-Extensions
>>
>>
>>


Corina Posted on 2008-04-14 15:26:44.0Z
Reply-To: "Corina" <corina.strejcek@itsdone.at>
From: "Corina" <corina.strejcek@itsdone.at>
Newsgroups: Advantage.PHP
References: <47fcae22@solutions.advantagedatabase.com>
Subject: Re: Terrible slow SQL
Date: Mon, 14 Apr 2008 17:26:44 +0200
Lines: 30
Organization: Itsdone
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 91.114.8.210
Message-ID: <48037663@solutions.advantagedatabase.com>
X-Trace: 14 Apr 2008 09:21:07 -0700, 91.114.8.210
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!91.114.8.210
Xref: solutions.advantagedatabase.com Advantage.PHP:883
Article PK: 1135367

Hey I just solved my performance problem !!!
used with ads_prepare it works just fine (about 2 min)
Strange how big the impact is.... :)

GREETINGS!

"Corina" <corina.strejcek@itsdone.at> schrieb im Newsbeitrag
news:47fcae22@solutions.advantagedatabase.com...

> Hello,
>
> I am trying to make 30.000 inserts into my Advantage Database. The problem
> is ...it works, but it's damn slow.
> It takes about 3 hours for these 30.000 inserts to execute. My code looks
> something like this:
>
> //all inserts in one string
> $sql = "INSERT INTO \"$db\" (ID,Kundennummer,Identnr,Lotterie,Passwort)
> VALUES ($line,$Knr,$Inr,$Lott,'$Pwd'); INSERT INTO ....
>
> //execute
> $result=ads_exec($ads_hobr,$sql);
>
> Is there a way to increase the performance, I thought that it would work
> faster with those PHP-Extensions
>
>
>
>