[28094] in Perl-Users-Digest
Perl-Users Digest, Issue: 9458 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 12 18:05:52 2006
Date: Wed, 12 Jul 2006 15:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 12 Jul 2006 Volume: 10 Number: 9458
Today's topics:
=?ISO-8859-1?Q?Re:_Re:_Encoding_of_the_perl_output_=28= <flavell@physics.gla.ac.uk>
Re: Bad protocol 'tcp' <mark.clementsREMOVETHIS@wanadoo.fr>
Re: Bad protocol 'tcp' <DJStunks@gmail.com>
Re: Capture a frame from AVI/MOV <vilmos@soti.ca>
Re: Dereferencing Hash of Arrays <jennifer.drake@gmail.com>
FormMail Font Sizes/Space Issues johnmarkstanley@gmail.com
Re: FormMail Font Sizes/Space Issues <1usa@llenroc.ude.invalid>
Re: FormMail Font Sizes/Space Issues johnmarkstanley@gmail.com
Re: FormMail Font Sizes/Space Issues <1usa@llenroc.ude.invalid>
Re: FormMail Font Sizes/Space Issues <sherm@Sherm-Pendleys-Computer.local>
Re: processing large numbers/values/figures <ruf@rawip.org>
Re: processing large numbers/values/figures <someone@example.com>
Re: processing large numbers/values/figures <rvtol+news@isolution.nl>
Re: processing large numbers/values/figures <David.Squire@no.spam.from.here.au>
Re: processing large numbers/values/figures <ruf@rawip.org>
Re: processing large numbers/values/figures <tadmc@augustmail.com>
Question on "if" statement <"v.niekerk at hccnet.nl">
Re: Question on "if" statement <mritty@gmail.com>
Re: Question on "if" statement <abigail@abigail.nl>
Re: Results in multiple pages. Takes too much time <dont_bug_me@all.uk>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 12 Jul 2006 20:14:45 +0100
From: "Alan J. Flavell" <flavell@physics.gla.ac.uk>
Subject: =?ISO-8859-1?Q?Re:_Re:_Encoding_of_the_perl_output_=28=E1_=E9_=ED_=F3=29?=
Message-Id: <Pine.LNX.4.64.0607122007220.9658@ppepc20.ph.gla.ac.uk>
On Tue, 11 Jul 2006, Ben Bullock wrote:
> "Alan J. Flavell" <flavell@physics.gla.ac.uk> wrote in message
> > On Mon, 10 Jul 2006, Ben Bullock wrote:
> > > and the problem is not Perl but that the
> > > browser encoding is not set properly.
> >
> > Well, the proper place to set the character encoding for a browser is
> > from the document source - rather than being set in the browser by the
> > recipient, which is at best a workaround or repair technique.
>
> Some other people (I see the names Sherm Pendley and Reto) already
> made extensive posts about how to fix the encoding, but no-one
> seemed to have mentioned that the supposedly incorrect output from
> Perl was actually correct utf8.
Really? I thought that you did:
> > > and the problem is not Perl but that the
> > > browser encoding is not set properly.
But when Perl has emitted a (correctly encoded) document, and sent it
to some browser, the browser has no inherent idea of which character
encoding was being used by Perl for its output: the point of my
followup was to stress that this needs to be done, and suggesting the
various ways that are available. By all means it was off-topic for a
strictly Perl agenda, but it was part of the actual problem.
On the other hand, if one wants effective control over the character
encoding that Perl will emit, then Sherm's posting is relevant. (And
on-topic ;-)
Hope that addresses your concerns.
------------------------------
Date: Wed, 12 Jul 2006 20:37:16 +0200
From: Mark Clements <mark.clementsREMOVETHIS@wanadoo.fr>
Subject: Re: Bad protocol 'tcp'
Message-Id: <44b54158$0$1000$ba4acef3@news.orange.fr>
garrett.hennessey@gmail.com wrote:
> Thanks Mark -
>
> This supports my belief that for whatever reason, my 'protocol' file is
> never being used. Any ideas why this may happen?
>
Pass. What does
use strict;
use warnings;
my $protocolFilePath = q(C:\Windows\System32\Drivers\Etc\Protocol);
my $protocolFH;
open ( $protocolFH, "<", $protocolFilePath )
or die "could not open $protocolFilePath for read: $!";
give you?
Beyond that, I have a few leads in mind but I'm no Windows expert and so
they're little more than conjecture. There are people in here with
vastly more experience than me, although this appears to be more of a
Windows question than Perl.
regards,
Mark
------------------------------
Date: 12 Jul 2006 13:05:54 -0700
From: "DJ Stunks" <DJStunks@gmail.com>
Subject: Re: Bad protocol 'tcp'
Message-Id: <1152734754.569093.230180@s13g2000cwa.googlegroups.com>
Mark Clements wrote:
> garrett.hennessey@gmail.com wrote:
> > Thanks Mark -
> >
> > This supports my belief that for whatever reason, my 'protocol' file is
> > never being used. Any ideas why this may happen?
> >
>
> Pass. What does
>
> use strict;
> use warnings;
>
>
> my $protocolFilePath = q(C:\Windows\System32\Drivers\Etc\Protocol);
> my $protocolFH;
>
> open ( $protocolFH, "<", $protocolFilePath )
> or die "could not open $protocolFilePath for read: $!";
Hey Mark, you can declare your lexical filehandle in the open(). just
FYI :)
open my $lexical_fh, '<', $infile...
-jp
------------------------------
Date: 12 Jul 2006 13:01:33 -0700
From: Vilmos Soti <vilmos@soti.ca>
Subject: Re: Capture a frame from AVI/MOV
Message-Id: <lq4pxmh9sy.fsf@vilmos.msmri.medicine.ubc.ca>
pjsenthil@gmail.com writes:
> I read the mplayer. there is option like converting the whole video
> file into frames..but not the required frame.
This is how I extract a specific frame through mplayer:
mplayer -vo jpeg -ao null -ss $icon_time -frames 2 avifile.avi
Check the -ss switch in the manpage. You might also want to check
the -vo switch, and use png instead of jpeg depending on your needs.
You need to extract 2 frames, since the first will be the very
first frame of the video, and the second one is the one you need.
> That option is also there "grab_frame" but it is not implemented.
Where is it? In the source? I couldn't find it in the manpage.
Vilmos
------------------------------
Date: 12 Jul 2006 11:35:22 -0700
From: "Jennifer I. Drake" <jennifer.drake@gmail.com>
Subject: Re: Dereferencing Hash of Arrays
Message-Id: <1152729322.393417.49850@s13g2000cwa.googlegroups.com>
> You were right to be weary about that. What you *should* have done was
> created a *short* but still complete script that demonstrates your
> error. That is, par your code down, removing the bits that aren't
> relevant to the problem at hand, until you are left with a short script
> that someone can run by copy and pasting which still demonstrates your
> error.
>
> Please read the Posting Guidelines that are posted here twice a week.
> They contain valuable information that will help you get the most help
> out of this newsgroup.
Again, I apologize. I'll be sure to do that in the future instead of
the way I posted. Using a short script also helped me further test the
issue, so I see the value in doing it that way.
> Why are you prepending your subroutine calls with the ampersand? Do
> you know what two side effects that produces? If not, you shouldn't be
> using it.
A lot of the ampersands are leftovers from the original version of the
code (written in Perl 4, I believe). I've gone through and removed
them.
> Here you're re-assigning @values each time through your loop, but
> you're not re-*declaring* it. That is, you're re-using the same
> variable each time through...
...
> ...and here, you're storing multiple references to that same variable
> at different points in your structure. So every time you changed the
> contents of @values above, you changed the values previously stored in
> your overall structure. Change that while loop to:
> while (my ($spot, @values) = $sth->fetchrow_array) {
...
> I'm *guessing* that @values above was the cause of your error. After
> making that change, if you still aren't seeing the results you desire,
> please post a *short* but *complete* script that demonstrates the
> error, along with your sample input, desired output, and actual output.
>
> Paul Lalli
That was exactly the problem. I made the change and everything is
working correctly. Thank you so much for your help.
-Jennifer
------------------------------
Date: 12 Jul 2006 11:45:08 -0700
From: johnmarkstanley@gmail.com
Subject: FormMail Font Sizes/Space Issues
Message-Id: <1152729908.678209.112920@s13g2000cwa.googlegroups.com>
I'm using the latest version of FormMail from Matt's Script Archive.
The email that gets generated by form submissions is double spaced and
uses a fairly large font (for my purposes, at least). I'd like to
adjust the script so that the email is single spaced and uses a smaller
font. Any ideas?
------------------------------
Date: Wed, 12 Jul 2006 18:53:56 +0000 (UTC)
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: FormMail Font Sizes/Space Issues
Message-Id: <Xns97FE978F52B9Fasu1cornelledu@132.236.56.8>
johnmarkstanley@gmail.com wrote in news:1152729908.678209.112920
@s13g2000cwa.googlegroups.com:
> I'm using the latest version of FormMail from Matt's Script Archive.
> The email that gets generated by form submissions is double spaced and
> uses a fairly large font (for my purposes, at least). I'd like to
> adjust the script so that the email is single spaced and uses a smaller
> font. Any ideas?
Don't use Matt's crap.
http://nms-cgi.sourceforge.net/
Sinan
------------------------------
Date: 12 Jul 2006 11:58:42 -0700
From: johnmarkstanley@gmail.com
Subject: Re: FormMail Font Sizes/Space Issues
Message-Id: <1152730722.475779.286590@p79g2000cwp.googlegroups.com>
A. Sinan Unur wrote:
> johnmarkstanley@gmail.com wrote in news:1152729908.678209.112920
> @s13g2000cwa.googlegroups.com:
>
> > I'm using the latest version of FormMail from Matt's Script Archive.
> > The email that gets generated by form submissions is double spaced and
> > uses a fairly large font (for my purposes, at least). I'd like to
> > adjust the script so that the email is single spaced and uses a smaller
> > font. Any ideas?
>
> Don't use Matt's crap.
>
> http://nms-cgi.sourceforge.net/
>
> Sinan
I'd love to avoid it, but the NMS script don't work with the host I'm
using, and I have no option but to use that host. I assume there's a
way to change spacing/font size with the NMS script?
------------------------------
Date: Wed, 12 Jul 2006 19:29:14 +0000 (UTC)
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: FormMail Font Sizes/Space Issues
Message-Id: <Xns97FE9D8B1F7CDasu1cornelledu@132.236.56.8>
johnmarkstanley@gmail.com wrote in
news:1152730722.475779.286590@p79g2000cwp.googlegroups.com:
>
> A. Sinan Unur wrote:
>> johnmarkstanley@gmail.com wrote in news:1152729908.678209.112920
>> @s13g2000cwa.googlegroups.com:
>>
>> > I'm using the latest version of FormMail from Matt's Script
>> > Archive. The email that gets generated by form submissions is
>> > double spaced and uses a fairly large font (for my purposes, at
>> > least). I'd like to adjust the script so that the email is single
>> > spaced and uses a smaller font. Any ideas?
>>
>> Don't use Matt's crap.
>>
>> http://nms-cgi.sourceforge.net/
>>
>> Sinan
>
> I'd love to avoid it, but the NMS script don't work with the host I'm
> using, and I have no option but to use that host. I assume there's a
> way to change spacing/font size with the NMS script?
>
I have no idea. I don't think the modules have anything to do with font
sizes or spacing.
I just wanted to reduce the amount of spam the world gets.
Sinan
------------------------------
Date: Wed, 12 Jul 2006 18:01:59 -0400
From: Sherm Pendley <sherm@Sherm-Pendleys-Computer.local>
Subject: Re: FormMail Font Sizes/Space Issues
Message-Id: <m2mzbecwiw.fsf@Sherm-Pendleys-Computer.local>
johnmarkstanley@gmail.com writes:
> I'm using the latest version of FormMail from Matt's Script Archive.
> The email that gets generated by form submissions is double spaced and
> uses a fairly large font (for my purposes, at least). I'd like to
> adjust the script so that the email is single spaced and uses a smaller
> font. Any ideas?
First of all, ditch the Matt's S**t Archive script - the multiple serious
security flaws in those scripts are very widely documented and discussed.
Even Matt Wright himself has disowned them.
For a *much* better replacment, have a look at:
<http://nms-cgi.sourceforge.net/>
As for the question itself, Matt's FormMail doesn't specify the font,
spacing, or any other display attribute. It sends its results as plain
old ASCII text. If your mail program is displaying it as huge double-
spaced text, that's a problem with your mail program's configuration.
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: 12 Jul 2006 20:21:11 +0100
From: Lukas Ruf <ruf@rawip.org>
Subject: Re: processing large numbers/values/figures
Message-Id: <slrnebafco.j9k.ruf@pc-4082.ethz.ch>
> Sherm Pendley [Wed, 12 Jul 2006 13:50:01 -0400]:
>
> Lukas Ruf <ruf@rawip.org> writes:
>
> > perl does not emit any warning anymore -- did you refer to my
> > mistyping of
> >
> >> >> > $hsh{$key} += @record{$index};
> >
> > instead of
> >
> > $hsh{$key} += @record[$index];
>
> Not that I want to be redundant, but the above is exactly why the
> posting guidelines suggest copy-and-pasting your code instead of
> retyping it. It helps avoid errors such as these.
>
yeah, I know.
> It also helps avoid "read the posting guidelines" responses. :-)
>
but to the other question: does Perl initialize all value-fields to
zero, primarily for hash-value fields?
Thanks.
wbr,
Lukas
--
Lukas Ruf <http://www.lpr.ch> | Ad Personam
rbacs <http://wiki.lpr.ch> | Restaurants, Bars and Clubs
Raw IP <http://www.rawip.org> | Low Level Network Programming
<http://lists.lpr.ch/muttprint> | muttprint mailing list
------------------------------
Date: Wed, 12 Jul 2006 18:36:45 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: processing large numbers/values/figures
Message-Id: <1jbtg.49142$B91.2173@edtnps82>
Lukas Ruf wrote:
>
> But anyway: I make use of sth like the following code:
>
> use strict;
> use warnings;
>
> my $inline = "";
> my @record;
> my %hsh = ();
> my $key = 0;
> my $index = 0;
>
> open(INFILE, "< $FILENAME") || die "can't open $FILENAME" ;
You should include the $! variable in the error message so you know *why* the
file could not be opened.
> print(STDERR "$FILENAME opened\n");
>
> while (defined($inline = <INFILE>))
You should declare $inline here instead of above:
while (defined(my $inline = <INFILE>))
> {
> chomp $inline; # remove '\n'
Not necessarily, chomp removes whatever $/ contains ... sometimes, and
sometimes it removes more than $/ contains (paragraph mode), and sometimes it
removes nothing.
> $inline =~ s/\s+//g;
There, you didn't need chomp() anyway because \s includes \n.
> @record = split(/,/, $inline);
>
> $record[$index]++;
> $hsh{$key} += $record[$index];
> }
>
> My questions:
> - is it correct that all newly created hash-values are initialized
> to zero by Perl automagically?
No. Any key without a defined value has the value undef ... which perl
automagically converts to zero when used in the correct context.
> - or do I need to initialize them manually? If so, how?
To initialize the values of a hash you first have to have the keys.
$_ = 0 for values %hash;
Will set every value in the hash to zero.
John
--
use Perl;
program
fulfillment
------------------------------
Date: Wed, 12 Jul 2006 20:36:03 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: processing large numbers/values/figures
Message-Id: <e93mi7.13s.1@news.isolution.nl>
Lukas Ruf schreef:
> But anyway: I make use of sth like the following code:
Where both $key and $index remain 0?
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Wed, 12 Jul 2006 19:40:43 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: processing large numbers/values/figures
Message-Id: <e93fnc$cd4$1@gemini.csx.cam.ac.uk>
Lukas Ruf wrote:
>
> but to the other question: does Perl initialize all value-fields to
> zero, primarily for hash-value fields?
>
prompt> perl -e '$test{key}++; print $test{key}'
1
------------------------------
Date: 12 Jul 2006 20:47:44 +0100
From: Lukas Ruf <ruf@rawip.org>
Subject: Re: processing large numbers/values/figures
Message-Id: <slrnebagug.j9k.ruf@pc-4082.ethz.ch>
> David Squire [Wed, 12 Jul 2006 19:40:43 +0100]:
>
> Lukas Ruf wrote:
> >
> > but to the other question: does Perl initialize all value-fields
> > to zero, primarily for hash-value fields?
> >
>
> > perl -e '$test{key}++; print $test{key}'
> 1
thanks a lot!
I am looking forward to the time once I will understand Perl
better ;)
wbr,
Lukas
--
Lukas Ruf <http://www.lpr.ch> | Ad Personam
rbacs <http://wiki.lpr.ch> | Restaurants, Bars and Clubs
Raw IP <http://www.rawip.org> | Low Level Network Programming
<http://lists.lpr.ch/muttprint> | muttprint mailing list
------------------------------
Date: Wed, 12 Jul 2006 13:59:49 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: processing large numbers/values/figures
Message-Id: <slrnebahl5.d4o.tadmc@magna.augustmail.com>
Lukas Ruf <ruf@rawip.org> wrote:
>> Tad McClellan [Tue, 11 Jul 2006 16:31:01 -0500]:
>> Lukas Ruf <ruf@rawip.org> wrote:
>> >> Tad McClellan [Tue, 11 Jul 2006 07:51:46 -0500]:
>> >> Lukas Ruf <ruf@rawip.org> wrote:
>> >>
>> >> > $hsh{$key} += @record{$index};
>> >>
>> >>
>> >> You should always enable warnings when developing Perl code.
>> >>
>> >
>> > meanwhile, I do.
>>
>>
>> You should not ignore the warnings that perl emits when developing
>> Perl code.
>>
>
> perl does not emit any warning anymore -- did you refer to my
> mistyping of
>
>> >> > $hsh{$key} += @record{$index};
>
> instead of
>
> $hsh{$key} += @record[$index];
No, since that generates a warning too:
perl -we '$hsh{$key} += @record[$index]'
Scalar value @record[$index] better written as $record[$index] at -e line 1.
Or did you just mistype it yet again?
Don't attempt to retype code, use copy/paste instead!
Have you seen the Posting Guidelines that are posted here frequently?
> $hsh{$key} += $record[$index];
> My questions:
> - is it correct that all newly created hash-values are initialized
> to zero by Perl automagically?
No. All newly created scalars (whether in a hash or not) are
initialized to undef by Perl automagically.
When you use an undef as if it was a number, it acts like a zero.
When you use an undef as if it was a string, it acts like an empty string.
> - or do I need to initialize them manually?
No, you do not need to initialize them manually for your usage above.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 12 Jul 2006 21:25:20 +0200
From: Huub <"v.niekerk at hccnet.nl">
Subject: Question on "if" statement
Message-Id: <44b54cb7$0$8860$e4fe514c@dreader31.news.xs4all.nl>
Hi,
I have a script that somehow doesn't process the "if" statement.
$plaats = "select plaats from hvw where lidnr = $record";
$sth = $dbh->prepare($plaats);
$sth->execute or die "SQL Error: $DBI::errstr\n";
@plaats = $sth->fetchrow_array;
$plaats[0] = @plaats;
if ($plaats[0] == 'Londen')
{
$voorletters = "select voorletters from hvw where lidnr = $record";
$sth = $dbh->prepare($voorletters);
$sth->execute or die "SQL Error: $DBI::errstr\n";
@voorletters = $sth->fetchrow_array;
This script stays busy without result.
$plaats = "select plaats from hvw where lidnr = $record";
$sth = $dbh->prepare($plaats);
$sth->execute or die "SQL Error: $DBI::errstr\n";
@plaats = $sth->fetchrow_array;
$plaats[0] = @plaats;
unless ($plaats[0] == 'Londen')
{
$voorletters = "select voorletters from hvw where lidnr = $record";
$sth = $dbh->prepare($voorletters);
$sth->execute or die "SQL Error: $DBI::errstr\n";
@voorletters = $sth->fetchrow_array;
Though this does give results, it shows everything, including when it's
Londen.
I've been searching through CPAN and have tried with and without
brackets and/or quotes, @ instead of $, with and without [0], but I
can't get it right. Where am I going wrong?
Thanks for helping out.
Huub
------------------------------
Date: 12 Jul 2006 12:30:08 -0700
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Question on "if" statement
Message-Id: <1152732608.618809.143740@p79g2000cwp.googlegroups.com>
Huub wrote:
> I have a script that somehow doesn't process the "if" statement.
>
> $plaats = "select plaats from hvw where lidnr = $record";
> $sth = $dbh->prepare($plaats);
> $sth->execute or die "SQL Error: $DBI::errstr\n";
> @plaats = $sth->fetchrow_array;
> $plaats[0] = @plaats;
What, exactly, do you think that line is doing?
> if ($plaats[0] == 'Londen')
You are not running with warnings enabled. It's extremely rude of you
to ask hundreds of people around the world to tell you what you've done
wrong, when you haven't even bothered to ask Perl what you've done
wrong.
Put the line:
use warnings;
at the top of your script, right under the shebang.
When Perl gives you the warning about this line, if you can't figure
out what it means, first read:
perldoc perldiag
If you can't figure it out from there, read some introductory Perl
documentation:
perldoc perlintro
perldoc perldata
perldoc perlsyn
perldoc perlop
If you still don't get it, post here again. Make sure the code you
post has both 'use strict;' and 'use warnings;' enabled.
Paul Lalli
------------------------------
Date: 12 Jul 2006 20:58:21 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Question on "if" statement
Message-Id: <slrnebaojc.c2.abigail@alexandra.abigail.nl>
Huub () wrote on MMMMDCXCVIII September MCMXCIII in
<URL:news:44b54cb7$0$8860$e4fe514c@dreader31.news.xs4all.nl>:
$$ Hi,
$$
$$ I have a script that somehow doesn't process the "if" statement.
$$
$$ $plaats = "select plaats from hvw where lidnr = $record";
$$ $sth = $dbh->prepare($plaats);
$$ $sth->execute or die "SQL Error: $DBI::errstr\n";
$$ @plaats = $sth->fetchrow_array;
$$ $plaats[0] = @plaats;
An array in scalar context returns the number of elements of the array.
Hence, $plaats[0] contains a number.
$$ if ($plaats[0] == 'Londen')
== is numeric compare. 'Londen' in numeric context is 0 (and results in
a run-time warning if you have warnings turned on).
So, unless your query doesn't return anything, your condition will be false.
Abigail
--
BEGIN {$^H {join "" => ("a" .. "z") [8, 13, 19, 4, 6, 4, 17]} = sub
{["", "Just ", "another ", "Perl ", "Hacker"] -> [shift]};
$^H = hex join "" => reverse map {int ($_ / 2)} 0 .. 4}
print 1, 2, 3, 4, "\n";
------------------------------
Date: Wed, 12 Jul 2006 18:23:40 GMT
From: Jeff <dont_bug_me@all.uk>
Subject: Re: Results in multiple pages. Takes too much time
Message-Id: <M6btg.3641$vO.485@newsread4.news.pas.earthlink.net>
premgrps@gmail.com wrote:
> Hi,
> I have a table of a million records and wrote a CGI-PERL script to
> display the results based on the user input.
Post some code, it seems to me that you may be doing something wrong,
wrong, wrong... I'm assuming you are using DBI, just post the execute
and fetch part of the code.
The results might be
> anywhere from 100 to 1000 per query and presently I am displaying them
> as 25 results per page.
>
> Problem: Each query is taking about 20-30 seconds.
Could be for non indexed... What do the indexes look like and what
does your SQL look like?
>
> My solution: I have tried to optimize the table and also index the
> table. I have actually converted a MS access database to SQL database,
> so it wasn't previously indexed. Both optimization and indexing doesn't
> give any good results. I always get a timeout. ie. it takes longer
> after indexing and optimizing.
>
> 1. I was wondering if someone has a creative solution for this. ie.
> reduce the time from 20-30 seconds to atleast 10 seconds.
>
> 2. I have links of pages of results beneath the first page result. When
> each of these links are clicked it takes 20-30 seconds again. Is there
> a way I can reduce the time taken for the subsequent pages are reduced?
> I cannot use the LIMIT option in mysql,
Sure you can, limit has a "start" and an "end" value. Frankly I don't
know how they do this in SQL Server where you only have top.
Jeff
since I have a where clause
> which has to search through the whole table. I tried using views and
> using limits, but it takes as much time.
>
> Please let me know.
>
> Thanks.
>
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 9458
***************************************