Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Circumventing 2GB Limit?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00856128
Message ID:
00856147
Vues:
15
>I have a friend who's trying to avoid going to SQL, but has a VFP table nearing the 2GB limit. He has tons of reports written using this table.
>
>I though we might postpone the inevitable if we split the table into several pieces and joined them using a view - but it occurred to me that if the view creates a 2.5 GB temporary table in the background, we might be screwed anyway.
>
>So my question is: Is it possible to create a VIEW greater than 2GB in VFP?

Probably not, but why restrict your options? Can you run the following code (Fox 6 & later) and paste the results?
*- AnalyseContent.Prg
Clear
cAlias = Alias()

iMaxNameLen = 0
For iField = 1 To FCount()
	cField = Field( iField )
	iMaxNameLen = Max( iMaxNameLen, Len( cField ))
Next iField

_ClipText = "<" + "pre>Statistics for " + cAlias ;
		+ Chr(13) + Chr(10) ;
		+ "Total Rows = " + Transform( RecCount( cAlias )) ;
		+ Chr(13) + Chr(10) ;
		+ Chr(13) + Chr(10) ;
		+ Space( iMaxNameLen - 1 ) ;
		+ "Type Len         Min         Max         Avg       Empty      %" ;
		+ Chr(13) + Chr(10) ;
		+ Replicate( "-", iMaxNameLen ) ;
		+ "--------------------------------------------------------------"

For iField = 1 To FCount()
	cField = Field( iField )
	? cField
	cType = Type( cField )
	_ClipText = _ClipText ;
		+ Chr(13) + Chr(10) ;
		+ PadL( cField, iMaxNameLen ) + " " ;
		+ cType + " " ;
		+ PadL( iif( cType == "C", Len( Evaluate( cField )), "" ), 4 ) + " "
	Do Case
		Case cType $ "MLG"
			*- Ignore

		Case cType == "C"
			Select Min( Len( AllTrim( &cField. ))) As iMinLen ;
					, Max( Len( AllTrim( &cField. ))) As iMaxLen ;
					, Avg( Len( AllTrim( &cField. ))) As iAvgLen ;
					, Sum( iif( Empty( &cField. ), 1, 0 )) As iEmpty ;
				From (cAlias) ;
				Into Array aStatistics

		Case cType $ "NY"
			Select Min( &cField. ) As iMinLen ;
					, Max( &cField. ) As iMaxLen ;
					, Avg( &cField. ) As iAvgLen ;
					, Sum( iif( Empty( &cField. ), 1, 0 )) As iEmpty ;
				From (cAlias) ;
				Into Array aStatistics

		Case cType $ "DT"
			Select Min( &cField. ) As iMinLen ;
					, Max( &cField. ) As iMaxLen ;
					, -1 As iAvgLen ;
					, Sum( iif( Empty( &cField. ), 1, 0 )) As iEmpty ;
				From (cAlias) ;
				Into Array aStatistics
	EndCase
	If _Tally > 0 Then
		If Type( "aStatistics[ 1 ]" ) == "D" Then
			_ClipText = _ClipText ;
				+ PadL( TransForm( aStatistics[ 1 ]), 11 ) + " " ;
				+ PadL( TransForm( aStatistics[ 2 ]), 11 ) + " " ;
				+ PadL( TransForm( aStatistics[ 3 ]), 11 ) + " " ;
				+ PadL( TransForm( aStatistics[ 4 ]), 11 ) + " " ;
				+ PadL( TransForm( Int( 100 * (aStatistics[ 4 ] / RecCount( cAlias )))), 6 )
		Else
			_ClipText = _ClipText ;
				+ TransForm( Int( aStatistics[ 1 ]), "999,999,999" ) + " " ;
				+ TransForm( Int( aStatistics[ 2 ]), "999,999,999" ) + " " ;
				+ TransForm( Int( aStatistics[ 3 ]), "999,999,999" ) + " " ;
				+ TransForm( Int( aStatistics[ 4 ]), "999,999,999" ) ;
				+ PadL( TransForm( Int( 100 * (aStatistics[ 4 ] / RecCount( cAlias )))), 7 )
		Endif
	Endif
Next iField
_ClipText = _ClipText + "<" + "/pre>"
? "Done."
Return .T.
censored.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform