我有一个例子:
<ItemsControl ItemsSource="{Binding Persons}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=Name}" Width="150" />
<ListBox
BorderThickness="0"
Background="Transparent"
Margin="0 1"
ItemsSource="{Binding DataContext.Skills,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}},Mode=OneWay}"
SelectedItem="{Binding MasterSkill, Mode=TwoWay}"
SelectionMode="Single"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
=&GT;结果= 100
select count(1) from product where (product.loaisanpham = 10)
=&GT;结果= 5000000 现在,我有两个问题:
select count(1) from product where (product.giasanpham > 10000)
哪个更快(1)或(2)? 我正在使用SQL Server 。 我记得当我使用mongodb时,(1)更快(2)